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

Function read_string

src/os/linux/kernel_resolver.cpp:57–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool read_string(const PhysicalLayer& phys, PAddr pa, std::size_t max, std::string& out) {
58 std::vector<u8> b(max);
59 std::size_t got = phys.read(pa, b.data(), b.size());
60 if (got == 0) return false;
61 std::size_t n = 0;
62 while (n < got && b[n]) ++n;
63 out.assign(reinterpret_cast<char*>(b.data()), n);
64 return true;
65}
66
67} // anonymous
68

Callers 1

resolve_kernelFunction · 0.85

Calls 2

readMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected