---
name: "nvme_init_set_features_write_protect-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_init_set_features_write_protect-libnvme3"
---

# nvme\_init\_set\_features\_write\_protect-libnvme3(2)

Initialize passthru command for Write Protect

## NAME

nvme\_init\_set\_features\_write\_protect - Initialize passthru command for Write Protect

## SYNOPSIS

**void nvme\_init\_set\_features\_write\_protect** **(struct libnvme\_passthru\_cmd \*cmd** *,* **\_\_u32 nsid** *,* **bool sv** *,* **enum nvme\_feat\_nswpcfg\_state wps** *);*

## ARGUMENTS

- cmd

  Passthru command to use

- nsid

  Namespace ID

- sv

  Save value across power states

- wps

  Write Protection State

## DESCRIPTION

Initializes the passthru command buffer for the Set Features command with FID value NVME\_FEAT\_FID\_WRITE\_PROTECT
