---
name: "libnvme_get_subsystem-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_subsystem-libnvme3"
---

# libnvme\_get\_subsystem-libnvme3(2)

Returns struct libnvme\_subsystem object

## NAME

libnvme\_get\_subsystem - Returns struct libnvme\_subsystem object

## SYNOPSIS

**int libnvme\_get\_subsystem** **(struct libnvme\_global\_ctx \*ctx** *,* **struct libnvme\_host \*h** *,* **const char \*name** *,* **const char \*subsysnqn** *,* **struct libnvme\_subsystem \*\*s** *);*

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- h

  *struct libnvme\_host* object

- name

  Name of the subsystem (may be NULL)

- subsysnqn

  Subsystem NQN

- s

  struct libnvme\_subsystem object

## DESCRIPTION

Returns an *struct libnvme\_subsystem* object in *h* base on *name* (if present) and *subsysnqn* or create one if not found.
