nvme_mi_adm...detach_ctrls(2)
π nvme_mi_adm...detach_ctrls(2) β aka the libnvme API manual, bestie β¨
okay so sit down, grab a strawberry π, because we're talking about a lil function from the libnvme API manual and she is lowkey iconic. no cap.
π NAME π
nvme_mi_admin_ns_detach_ctrls β she detaches a namespace from controllers. that's it, that's the whole job. periodt. π
β¨ SYNOPSIS β¨
int nvme_mi_admin_ns_detach_ctrls (nvme_mi_ctrl_t ctrl , __u32 nsid ,
struct nvme_ctrl_list *ctrlist );
look at her go. three (3) arguments, one (1) int coming back at you. the way that she just... does that. ππ
π«Ά ARGUMENTS π«Ά
ctrlβ the controller you're sending the command to. like, the address you're mailing this whole situation to. πnsidβ the Namespace ID you're detaching. the main character in this narrative, fr fr.ctrlistβ the controller list whose attachment state fornsidis getting modified. yes girl, we are editing the vibes in this list.
π RETURN π
she gives you back the nvme command status if a response was actually received β check enum nvme_status_field for what that status is saying, iykyk β or she hits you with -1 with errno set otherwise. no in-between, no situationship. it's giving either/or energy. π
heads up bestie:-1means look aterrno, that's the only way you're getting the tea π΅
and that's the whole page, we ate and left no crumbs. π
sign-off era: this lil slice of heaven lives in the libnvme API manual, and she was dated July 2026 β so yes, she's a future icon, we been knew. π bye bestie, go detach something (responsibly) π¦
π¦ 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