---
name: "libnvmf_exclusion_add_subsysnqn-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_subsysnqn-libnvme3"
---

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

append a subsystem-NQN-only entry.

## NAME

libnvmf\_exclusion\_add\_subsysnqn - append a subsystem-NQN-only entry.

## SYNOPSIS

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

## ARGUMENTS

- ctx

  libnvme global context; must not be NULL

- name

  list name

- subsysnqn

  subsystem NQN to exclude; must not be NULL or empty

## DESCRIPTION

Builds an exclusion entry matching every controller of a subsystem (the entry constrains only the NQN) 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 *subsysnqn* is NULL/empty, negative errno otherwise.
