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.