Skip to main content

nvme_set_features_write_protect

Function nvme_set_features_write_protect 

Source
pub unsafe extern "C" fn nvme_set_features_write_protect(
    fd: c_int,
    state: nvme_feat_nswpcfg_state,
    save: bool,
    result: *mut __u32,
) -> c_int
Expand description

nvme_set_features_write_protect() - Set write protect feature

Deprecated: doesn’t support specifying a NSID. Use nvme_set_features_write_protect2() instead.

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

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