---
name: "nvme_get_ctrl_attr"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_get_ctrl_attr"
---

# nvme\_get\_ctrl\_attr(2)

Read controller sysfs attribute

## NAME

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

## SYNOPSIS

**char \* nvme\_get\_ctrl\_attr** **(nvme\_ctrl\_t c** *,* **const char \*attr** *);*

## ARGUMENTS

- c

  Controller instance

- attr

  sysfs attribute name

## RETURN

String with the contents of *attr* or NULL in case of an empty value or in case of an error (indicated by non-zero errno code).
