---
name: "libnvme_get_ctrl_attr-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/libnvme_get_ctrl_attr-libnvme3"
---

# libnvme\_get\_ctrl\_attr-libnvme3(2)

Read controller sysfs attribute

## NAME

libnvme\_get\_ctrl\_attr - Read controller sysfs attribute

## SYNOPSIS

**char \* libnvme\_get\_ctrl\_attr** **(struct libnvme\_ctrl \*c** *,* **const char \*attr** *);*

## ARGUMENTS

- c

  Controller instance

- attr

  sysfs attribute name

## RETURN

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