MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / activation_native_read

Function activation_native_read

src/cli/activation_transaction.c:1780–1801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1778}
1779
1780static bool activation_native_read(activation_native_file_t file, void *buffer, size_t capacity,
1781 size_t *read_out) {
1782#ifdef _WIN32
1783 DWORD amount = 0;
1784 DWORD request = capacity > (size_t)UINT32_MAX ? UINT32_MAX : (DWORD)capacity;
1785 if (!ReadFile(file, buffer, request, &amount, NULL)) {
1786 return false;
1787 }
1788 *read_out = (size_t)amount;
1789 return true;
1790#else
1791 ssize_t result;
1792 do {
1793 result = read(file, buffer, capacity);
1794 } while (result < 0 && errno == EINTR);
1795 if (result < 0) {
1796 return false;
1797 }
1798 *read_out = (size_t)result;
1799 return true;
1800#endif
1801}
1802
1803cbm_activation_transaction_status_t cbm_activation_transaction_stage_file(
1804 const char *target_path, const char *candidate_path,

Callers 1

Calls 1

readFunction · 0.50

Tested by

no test coverage detected