This change required libnvme FEAT_PLS_MODE definition added.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
case NVME_FEAT_FID_SPINUP_CONTROL:
printf("\tSpinup control feature Enabled: %s\n", (result & 1) ? "True" : "False");
break;
+ case NVME_FEAT_FID_POWER_LOSS_SIGNAL:
+ printf("\tPower Loss Signaling Mode (PLSM): %s\n",
+ nvme_pls_mode_to_string(NVME_GET(result, FEAT_PLS_MODE)));
+ break;
case NVME_FEAT_FID_ENH_CTRL_METADATA:
case NVME_FEAT_FID_CTRL_METADATA:
case NVME_FEAT_FID_NS_METADATA:
return "Reserved";
}
+const char *nvme_pls_mode_to_string(__u8 mode)
+{
+ switch (mode) {
+ case 0:
+ return "not enabled";
+ case 1:
+ return "enabled with Emergency Power Fail";
+ case 2:
+ return "enabled with Forced Quiescence";
+ default:
+ break;
+ }
+
+ return "Reserved";
+}
+
void nvme_feature_show(enum nvme_features_id fid, int sel, unsigned int result)
{
nvme_print(show_feature, NORMAL, fid, sel, result);
const char *nvme_pel_ehai_pit_to_string(enum nvme_pel_ehai_pit pit);
const char *nvme_ssi_state_to_string(__u8 state);
const char *nvme_time_scale_to_string(__u8 ts);
+const char *nvme_pls_mode_to_string(__u8 mode);
void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len);
void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len);