libnvmf\_exclusion\_read(9) libnvme API manual libnvmf\_exclusion\_read(9)

# [NAME](#NAME)

libnvmf\_exclusion\_read - read a list's raw text and a concurrency token.

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_exclusion\_read** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*name ,** **char \*\*text ,** **uint64\_t \*version );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

libnvme global context; must not be NULL

[name](#name)

list name

[text](#text)

on success, set to the file's full contents as a newly allocated, NUL-terminated string (caller frees). A missing list reads as an empty string so an editor can create it.

[version](#version)

on success, set to an opaque token identifying the contents read. 0 means the list did not exist. Pass it back to **libnvmf\_exclusion\_write** to detect concurrent modification.

# [DESCRIPTION](#DESCRIPTION)

Intended for read-modify-write editors: read the raw text, let a human edit it, then write it back. The directory location is entirely libnvme's concern -- the caller works only in terms of list names.

# [RETURN](#RETURN)

0 on success, -EINVAL for a bad name or NULL out-param, negative errno otherwise.

libnvmf\_exclusion\_read October 2026

---

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