libnvme_sed_l0_next(9)
β¨ libnvme_sed_l0_next(9) β¨
okay so this one lives in the libnvme API manual and it's literally the cutest little iterator ever β it's called libnvme_sed_l0_next and it hands you the next Level 0 Discovery descriptor like it's passing you fries π bestie, let's go.
πΈ NAME πΈ
libnvme_sed_l0_next β bestie, it returns the next Level 0 Discovery descriptor π
no cap, that's the whole job.
π¦ SYNOPSIS π¦
struct tcg_l0_desc * libnvme_sed_l0_next (void *buf , size_t len ,
struct tcg_l0_desc *desc );
like, look at her. icon behavior. π
π ARGUMENTS π
bufβ the Level 0 Discovery data, aka the vibe source π«Άlenβ the size ofbuf, in bytes (yes, bytes, we count in bytes here)descβ the current descriptor, orNULLto get the first descriptor π (passNULLto start, that's your main character entry point)
π DESCRIPTION π
So the way this works: the walk ends at the length reported in the header, or at the end of buf β whichever comes first, fr fr. π
And listen, this part matters: a descriptor which does not fit completely ends the walk. Like, if it doesn't fit, we're done, no partials, no half-descriptors, periodt. π
β RETURN β
A pointer to the next descriptor π β¦ or NULL if there is none π (that's your "you've reached the end, log off" signal).
ngl, always check that return value, bestie β NULL is the polite way of saying "no more for you" π
and that's the whole page!! π§π written under the libnvme API manual, page libnvme_sed_l0_next(9), dated October 2026 β mwah, go iterate something gorgeous π
β¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms