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

Function lmpfs_kernel_banner

src/api/lmpfs.cpp:351–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349// ---- kernel context ------------------------------------------------------
350
351extern "C" LMPFS_API int lmpfs_kernel_banner(lmpfs_handle_t h, char* out,
352 size_t out_size) {
353 clear_last_error();
354 auto* H = check(h); if (!H) return -1;
355 if (!out || out_size == 0) { set_last_error("null/empty out"); return -1; }
356 try {
357 const auto& b = H->kernel().banner;
358 std::size_t n = std::min(b.size(), out_size - 1);
359 std::memcpy(out, b.data(), n);
360 out[n] = '\0';
361 return static_cast<int>(n);
362 } catch (const std::exception& e) {
363 set_last_error_fmt_what(e); return -1;
364 }
365}
366
367extern "C" LMPFS_API uint64_t lmpfs_kernel_direct_map_base(lmpfs_handle_t h) {
368 auto* H = check(h); if (!H) return 0;

Callers 1

mainFunction · 0.85

Calls 5

clear_last_errorFunction · 0.85
checkFunction · 0.85
set_last_errorFunction · 0.85
set_last_error_fmt_whatFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected