DOKK / manpages / debian 12 / libnvme-dev / nvme_set_features_write_protect.2.en
nvme_set_features_write_protect(2) libnvme API manual nvme_set_features_write_protect(2)

nvme_set_features_write_protect - Set write protect feature

int nvme_set_features_write_protect (int fd , enum nvme_feat_nswpcfg_state state , bool save , __u32 *result );

File descriptor of nvme device
Write Protection State
Save value across power states
The command completion result from CQE dword0

The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.

nvme_set_features_write_protect January 2023