libnvmf_registry_delete(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvmf_registry_delete β€” the libnvme API manual, bestie edition πŸ’…

okay so real talk, this one lives in the libnvme API manual and it's genuinely so straightforward you're gonna eat it up. it's called libnvmf_registry_delete and it does exactly one thing, but it does it iconically ✨


🌸 NAME 🌸

libnvmf_registry_delete β€” remove a controller's registry entry, periodt πŸ—‘οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

int libnvmf_registry_delete (struct libnvme_global_ctx *ctx , const char
*device );

that's it. two args, one return value, no drama πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the libnvme global context. this is the main character, and it must not be NULL β€” like, do not even try it, the vibe check will fail πŸ™ˆ
  • device β€” the kernel device name (e.g. "nvme3"). literally just the device name string, bestie 🫢

🌈 DESCRIPTION 🌈

so what it actually does: it removes the registry directory and all the attribute files for device. all of them. gone. clean slate, no crumbs left behind 🧹✨

it's called by the owning orchestrator on an intentional disconnect β€” like when you're the one deciding to leave the party, not when you got carried out πŸŽ€

real talk though: the udev REMOVE rule already handles the common case of kernel-driven removal directly via rm -rf and does not call this function. so this is the deliberate-exit path, not the surprise-eviction path. iykyk πŸ’€

⭐ RETURN ⭐

  • 0 on success β€” slay, we ate πŸ‘‘
  • -ENOENT if no entry exists β€” meaning there was literally nothing to delete, awkward 😭
  • negative errno from underlying system calls otherwise β€” yeah, if something under the hood decides to act up, you get whatever negative errno it felt like throwing at you πŸ”₯
no cap, keep an eye on that third one β€” it's the "anything else" bucket, so the specific error is coming from the system calls underneath, not from this function being cute.

and that's the whole page, bestie πŸ¦‹πŸ’–

cute little sign-off: this page is from October 2026, part of the libnvme API manual, and yes, libnvmf_registry_delete is both the page name and the thing you just read about β€” full circle moment πŸŒΈπŸŽ€β­

πŸ“¦ where this page comes from