---
name: "libnvme_ns_read-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_ns_read-libnvme3"
---

# libnvme\_ns\_read-libnvme3(2)

Read from a namespace

## NAME

libnvme\_ns\_read - Read from a namespace

## SYNOPSIS

**int libnvme\_ns\_read** **(struct libnvme\_ns \*n** *,* **void \*buf** *,* **off\_t offset** *,* **size\_t count** *);*

## ARGUMENTS

- n

  Namespace instance

- buf

  Buffer into which the data will be transferred

- offset

  LBA offset of *n*

- count

  Number of sectors in *buf*

## RETURN

Number of sectors read or -1 on error.
