nvmf_get_discovery_log(2)
π nvmf_get_discovery_log β bestie edition π
okay so this is a page from the libnvme API manual (that's the (2) vibe, iykyk) and it's all about one lil function called nvmf_get_discovery_log. buckle up π
β¨ NAME β¨
nvmf_get_discovery_log β returns the discovery log page, periodt.
πΈ SYNOPSIS πΈ
int nvmf_get_discovery_log (nvme_ctrl_t c , struct nvmf_discovery_log
**logp , int max_retries );
like⦠it takes three things and gives you back an int. slay.
π¦ ARGUMENTS π¦
cβ the discovery controller you're using, bestie. that's your entry point πlogpβ a pointer to the log page that's gonna get handed back to you πmax_retriesβ how many times you wanna retry if things go sideways π
π DESCRIPTION π
so here's the tea: the memory that gets allocated for the log page β the stuff that comes back to you in logp β must be freed by the caller using free. yep, that's on YOU. no one else is coming to clean that up, so don't ghost it π
π NOTE π
ngl, consider using nvmf_get_discovery_wargs instead. just saying. the way that this one is lowkey the older optionβ¦ π«Ά
π RETURN π
0on success β we love a win β¨- on failure,
-1is returned anderrnois set π
fr fr, always check that return value. the errno is giving you the actual reason and it's not gonna say it twice.
and that's the whole page, babe π§π this one came from the libnvme API manual, dated July 2026, and it's filed under nvmf_get_discovery_log in section (2) β mwah, go free your memory bestie π
π¦ 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