nvme_set_root(2)
π nvme_set_root β the libnvme API manual (section 2, bestie) π
okay so welcome to the nvme_set_root(2) page from the libnvme API manual, and yes we ARE doing this, sit down, hydrate π«Ά
β¨ NAME β¨
nvme_set_root β set that nvme_root_t context, periodt π
πΈ SYNOPSIS πΈ
void nvme_set_root (nvme_root_t r );
π ARGUMENTS π
rβ thenvme_root_tcontext. that's it, that's the whole arg, she's simple and she knows it π¦
π DESCRIPTION π
so here's the tea β sometimes you're deep in some code path and nobody handed you a root object as an argument, and you still gotta log. like, you NEED to log. and you can't, because no root object. tragic. devastating, even π
that's what this call is for!! it lets you set a default root object, so those root-less code paths can grab it and log anyway. main character energy fr fr β¨
and get this β when you create a brand new root object with nvme_create_root, the global root object gets set too. so the global root object is always pointing to the latest created root object π it's giving "newest one wins."
β οΈ heads up bestie, the first nvme_free_tree call will reset the global root object. so don't be out here assuming it's still there after that, because it is NOT π
π¨ ALSO, and I need you to hear me on this one: this function is deprecated. don't start anything new with it, okay? usenvme_init_default_loggingor/andnvme_init_logginginstead. the way that those two are the moment and this one is so 2024 π
and that's the whole page!! tysm for reading, you ate, no cap π
β from the libnvme API manual, this nvme_set_root page, dated July 2026, signed off with a lil sparkle β mwah π
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms