MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / perm_string

Function perm_string

src/os/linux/task_files.cpp:91–97  ·  view source on GitHub ↗

Map our Vma flags bitfield back to the rwxp string used by /proc/PID/maps.

Source from the content-addressed store, hash-verified

89
90// Map our Vma flags bitfield back to the rwxp string used by /proc/PID/maps.
91void perm_string(const Vma& v, char buf[5]) {
92 buf[0] = v.readable() ? 'r' : '-';
93 buf[1] = v.writable() ? 'w' : '-';
94 buf[2] = v.executable() ? 'x' : '-';
95 buf[3] = 'p'; // private mappings; we don't reliably distinguish shared yet
96 buf[4] = '\0';
97}
98
99} // anonymous
100

Callers 1

gen_mapsFunction · 0.85

Calls 3

readableMethod · 0.80
writableMethod · 0.80
executableMethod · 0.80

Tested by

no test coverage detected