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

Function posix_kernel_is_wsl

src/daemon/ipc.c:1785–1792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1783#define POSIX_V9FS_MAGIC 0x01021997UL
1784
1785static bool posix_kernel_is_wsl(void) {
1786 char release[128];
1787 if (!posix_read_small_proc_file("/proc/sys/kernel/osrelease", release, sizeof(release))) {
1788 return false;
1789 }
1790 return strstr(release, "microsoft") != NULL || strstr(release, "Microsoft") != NULL ||
1791 strstr(release, "WSL") != NULL;
1792}
1793#endif
1794
1795static bool posix_fd_on_wsl_drvfs(int directory_fd) {

Callers 1

posix_fd_on_wsl_drvfsFunction · 0.85

Calls 1

Tested by

no test coverage detected