libnvmf\_exclusion\_add\_ctrl(9) libnvme API manual libnvmf\_exclusion\_add\_ctrl(9)

# [NAME](#NAME)

libnvmf\_exclusion\_add\_ctrl - append an entry built from a controller.

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_exclusion\_add\_ctrl** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*name ,** **struct libnvme\_ctrl \*c );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

libnvme global context; must not be NULL

[name](#name)

list name

[c](#c)

connected controller; the entry's transport, traddr, trsvcid, subsysnqn and (when set) host-iface are taken from it

# [DESCRIPTION](#DESCRIPTION)

Builds the exclusion entry from the controller's transport parameters inside libnvme -- the caller needs no knowledge of the on-disk entry format -- then appends it via **libnvmf\_exclusion\_add**. Creates the list if it does not exist.

# [RETURN](#RETURN)

0 on success, -EINVAL if *ctx* or *c* is NULL or the controller lacks a transport/traddr/subsysnqn, negative errno otherwise.

libnvmf\_exclusion\_add\_ctrl October 2026

---

Document: libnvmf_exclusion_add_ctrl-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
