libnvmf_exclusion_add_ctrl(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvmf_exclusion_add_ctrl β€” bestie edition

okay so this is a page straight out of the libnvme API manual, and it's honestly such a vibe: it's the one that takes a controller you're already connected to and goes "boom, you're on the exclusion list now." no cap. let's get into it 🫢


✨ NAME ✨

libnvmf_exclusion_add_ctrl β€” append an entry built from a controller. literally that's the whole job, and she does it well πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int libnvmf_exclusion_add_ctrl (struct libnvme_global_ctx *ctx , const
       char *name , struct libnvme_ctrl *c );

like, yes, that's the whole signature, we love a concise queen ⭐


🌸 ARGUMENTS 🌸

  • ctx β€” the libnvme global context, bestie. it must not be NULL. do not come at her with a NULL, she will not be having it πŸ™ˆ
  • name β€” the list name. that's it, that's the argument πŸŽ€
  • c β€” a connected controller, and this is the main character right here πŸ‘‘ the entry's transport, traddr, trsvcid, subsysnqn, and (when set) host-iface are all taken from it. she's built different, and by different i mean from your controller's actual fields πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the lore: libnvmf_exclusion_add_ctrl builds the exclusion entry from the controller's transport parameters inside libnvme β€” meaning the caller needs zero knowledge of the on-disk entry format 😌 (you don't have to know how the sausage is stored, king, that's her problem now) β€” and then it appends it via libnvmf_exclusion_add. and if the list doesn't exist yet? she creates the list. she's proactive like that ✨

it's giving "i'll handle the paperwork for you" and honestly? obsessed πŸ”₯


🌈 RETURN 🌈

  • 0 on success β€” slay, we love a clean exit code πŸ’–
  • -EINVAL if ctx or c is NULL, or if the controller lacks a transport / traddr / subsysnqn β€” like, if the essential info isn't there, she can't build the entry, that's just facts πŸ’€
  • negative errno otherwise β€” some other little gremlin happened, check your errno πŸ™ˆ
fr fr: pass a NULL in ctx or c and you're getting -EINVAL back. no drama, just consequences πŸ’…

and that's the page, bestie 🧚 from the libnvme API manual, dated October 2026 β€” go forth and exclude those controllers, you've got this πŸ“πŸ’œ

πŸ“¦ where this page comes from