libnvme\_get\_ns\_attr(9) libnvme API manual libnvme\_get\_ns\_attr(9)

# [NAME](#NAME)

libnvme\_get\_ns\_attr - Read namespace sysfs attribute

# [SYNOPSIS](#SYNOPSIS)

**char * libnvme\_get\_ns\_attr** **(struct libnvme\_ns \*n ,** **const char \*attr );**

# [ARGUMENTS](#ARGUMENTS)

[n](#n)

struct libnvme\_ns object

[attr](#attr)

sysfs attribute name

# [RETURN](#RETURN)

A newly allocated string with the contents of *attr* (the caller frees), or NULL in case of an empty value or error.

libnvme\_get\_ns\_attr September 2026

---

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