carta
libnvmf_exclusion_read-libnvme3(2)

libnvmf_exclusion_read-libnvme32

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

Usage

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.

Overview

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.

From nvme-cli 3.2-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.