MCPcopy Create free account
hub / github.com/F-Stack/f-stack / preload_dump_internal

Function preload_dump_internal

freebsd/kern/subr_module.c:503–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503static void
504preload_dump_internal(struct sbuf *sbp)
505{
506 uint32_t *bptr, type, len;
507
508 KASSERT(preload_metadata != NULL,
509 ("%s called without setting up preload_metadata", __func__));
510
511 /*
512 * Iterate through the TLV-encoded sections.
513 */
514 bptr = (uint32_t *)preload_metadata;
515 sbuf_putc(sbp, '\n');
516 while (bptr[0] != MODINFO_END || bptr[1] != MODINFO_END) {
517 sbuf_printf(sbp, " %p:\n", bptr);
518 type = *bptr++;
519 len = *bptr++;
520
521 sbuf_printf(sbp, "\ttype:\t(%#04x) ", type);
522 preload_modinfo_type(sbp, type);
523 sbuf_putc(sbp, '\n');
524 sbuf_printf(sbp, "\tlen:\t%u\n", len);
525 sbuf_cat(sbp, "\tvalue:\t");
526 preload_modinfo_value(sbp, bptr, type, len);
527 sbuf_putc(sbp, '\n');
528
529 bptr += roundup(len, sizeof(u_long)) / sizeof(uint32_t);
530 }
531}
532
533/*
534 * Print the preloaded data to the console. Called from the machine-dependent

Callers 2

preload_dumpFunction · 0.85
sysctl_preload_dumpFunction · 0.85

Calls 5

sbuf_putcFunction · 0.85
sbuf_printfFunction · 0.85
preload_modinfo_typeFunction · 0.85
sbuf_catFunction · 0.85
preload_modinfo_valueFunction · 0.85

Tested by

no test coverage detected