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

# nvme\_status\_type-libnvme3(2)

type encoding for NVMe return values, when represented as an int.

## NAME

enum nvme\_status\_type - type encoding for NVMe return values, when represented as an int.

## SYNOPSIS

enum nvme\_status\_type {\
     **NVME\_STATUS\_TYPE\_SHIFT** , \
\
     **NVME\_STATUS\_TYPE\_MASK** , \
\
     **NVME\_STATUS\_TYPE\_NVME** , \
\
     **NVME\_STATUS\_TYPE\_MI**

};

## Constants

- NVME\_STATUS\_TYPE\_SHIFT

  shift value for status bits

- NVME\_STATUS\_TYPE\_MASK

  mask value for status bits

- NVME\_STATUS\_TYPE\_NVME

  NVMe command status value, typically from CDW3

- NVME\_STATUS\_TYPE\_MI

  NVMe-MI header status

## Description

The nvme\_\* api returns an int, with negative values indicating an internal or syscall error, zero signifying success, positive values representing the NVMe status.

That latter case (the NVMe status) may represent status values from different parts of the transport/controller/etc, and are at most 16 bits of data. So, we use the most-significant 3 bits of the signed int to indicate which type of status this is.
