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

# [NAME](#NAME)

libnvme\_get\_attr - Read sysfs attribute

# [SYNOPSIS](#SYNOPSIS)

**char * libnvme\_get\_attr** **(const char \*d ,** **const char \*attr );**

# [ARGUMENTS](#ARGUMENTS)

[d](#d)

sysfs directory

[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\_attr October 2026

---

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