---
name: "libnvmf_exclusion_add_ctrl-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvmf_exclusion_add_ctrl-libnvme3"
---

# libnvmf\_exclusion\_add\_ctrl-libnvme3(2)

append an entry built from a controller.

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- ctx

  libnvme global context; must not be NULL

- name

  list name

- c

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

## 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

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