libnvme_sed_discover(9)
π libnvme_sed_discover(9) β the libnvme API manual, bestie edition
okay so picture this: it's giving "libnvme API manual", it's giving TCG Level 0 Discovery energy, and the whole page is literally just one function. iconic honestly.
β¨ NAME β¨
libnvme_sed_discover β say hi to your TCG Level 0 Discovery data π like it literally retrieves it for you
πΈ SYNOPSIS πΈ
int libnvme_sed_discover (struct libnvme_transport_handle *hdl , void
*buf , __u32 len );
that's the whole vibe. three args, one int, no notes π
π¦ ARGUMENTS π¦
hdlβ your transport handle π«Ά the lil passport that lets you actually talk to the thingbufβ the buffer where the Level 0 Discovery data is gonna land β¨ it's the empty plate, she's servinglenβ size ofbuf, in bytes π and yes bestie, bytes matter, don't be out here guessing
π DESCRIPTION π
so what actually happens? it issues a Security Receive for the Level 0 Discovery ComID. that's the move. that's the whole move π₯
and here's the part where i need you to listen: the data comes back unparsed. raw. untouched. straight out the box π no cap, it is NOT gonna hand you neatly labeled feature descriptors, that is not her job.
so when you actually wanna look at what's inside β walk the feature descriptors and everything β you go grab libnvme_sed_l0_for_each or libnvme_sed_l0_find instead. those are the ones that do the walking π§ literally, walk the feature descriptors. iykyk.
π do not try to read the raw buffer like you know the layout. that's not this function's problem and it's not gonna be cute for you either.
π RETURN π
0β slay π success, we ate, nothing else to say- the NVMe command status β if a response was actually received, you get this instead. and bestie if you're wondering which status, check
enum nvme_status_field, that's where they all live π - a negative error code β for everything else. the "something went sideways and it wasn't the device talking back" situation π
π a lil sign-off π
made with love, libnvme_sed_discover, and stamped October 2026 πΈ the source/version line says libnvme_sed_discover and, yeah, the title up top said libnvme_sed_discover(9) again β she likes her name, let her have it ππ mwah, go discover some data bestie π«Ά
π¦ 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