xbc_init(9)
β¨ xbc_init β¨
okay so this is a page from the Kernel API Manual β yes bestie, the kernel has man pages too, we love a documented king π
β and it's all about xbc_init, which parses your XBC file and builds the whole XBC internal tree. very main character energy honestly πΈ
π NAME π
xbc_init β parse the XBC file you handed it and build the XBC internal tree π³β¨
π¦ SYNOPSIS π¦
int xbc_init (const char *data , size_t size , const char **emsg , int
*epos );
π ARGUMENTS π
dataβ the boot config text original data, aka the actual raw bytes you're feeding in πsizeβ the size ofdata, like how many bytes we're working with, no capemsgβ a pointer ofconst char *where the error message gets stored πeposβ a pointer ofintwhere the error position gets stored
π₯ DESCRIPTION π₯
this parses the boot config text in data. and listen β size must be smaller than XBC_DATA_MAX. not "should", must. that's the vibe check and if you fail it that's on you π
if it works out, it returns the number of stored nodes (>0) β slay π β or -errno if there's any error at all.
in error cases: emsg gets updated with an error message, and epos gets updated with the error position, which is the byte offset of buf. and if the error is not a parser error? then epos will be -1. iconic of it honestly π«Ά
π SEE ALSO π
Kernel file ./lib/bootconfig.c β and honestly the whole friend group:
xbc_prepend_embedded_cmdline(9)xbc_embedded_cmdline_applied(9)bootconfig_cmdline_requested(9)xbc_get_info(9)xbc_root_node(9)xbc_node_index(9)xbc_node_get_parent(9)xbc_node_get_child(9)xbc_node_get_next(9)xbc_node_get_data(9)xbc_node_find_subkey(9)xbc_node_find_value(9)xbc_node_compose_key_after(9)xbc_node_find_next_leaf(9)xbc_node_find_next_key_value(9)xbc_snprint_cmdline(9)_xbc_exit(9)
π and that's the whole page bestie π
this one's shipped straight out of ./lib, dated October 2026, and it's literally called xbc_init(9) β go build that tree, you got this π§β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms