---
name: "libnvmf_exclusion_read-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_read-libnvme3"
---

# libnvmf\_exclusion\_read-libnvme3(2)

read a list's raw text and a concurrency token.

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- ctx

  libnvme global context; must not be NULL

- name

  list name

- 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

  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

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

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