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

Function ipc_path_fs_magic

src/daemon/ipc.c:92–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90#endif
91
92static bool ipc_path_fs_magic(const char *path, unsigned long *magic_out) {
93#ifdef CBM_ENABLE_TEST_SEAMS
94 if (g_ipc_fs_magic_override_active) {
95 *magic_out = g_ipc_fs_magic_override;
96 return true;
97 }
98#endif
99#if defined(__linux__)
100 struct statfs status;
101 if (statfs(path, &status) != 0) {
102 return false;
103 }
104 /* f_type is a signed word on some ABIs; the magics are 32-bit. */
105 *magic_out = (unsigned long)status.f_type & 0xFFFFFFFFUL;
106 return true;
107#else
108 (void)path;
109 (void)magic_out;
110 return false;
111#endif
112}
113
114bool cbm_daemon_ipc_warn_if_network_cache_root(const char *cache_root) {
115 unsigned long magic = 0;

Calls 1

statfsClass · 0.85

Tested by

no test coverage detected