printf("\n");
}
-static char *fw_to_string(__u64 fw)
+static const char *fw_to_string(__u64 fw)
{
static char ret[9];
char *c = (char *)&fw;
printf(" Reserved CSE\n");
}
-static char *nvme_cmd_to_string(int admin, __u8 opcode)
+static const char *nvme_cmd_to_string(int admin, __u8 opcode)
{
if (admin) {
switch (opcode) {
printf("Estimated Time For Crypto Erase : %u\n", le32_to_cpu(sanitize->est_crypto_erase_time));
}
-char *nvme_feature_to_string(int feature)
+const char *nvme_feature_to_string(int feature)
{
switch (feature) {
case NVME_FEAT_ARBITRATION: return "Arbitration";
}
}
-char *nvme_register_to_string(int reg)
+const char *nvme_register_to_string(int reg)
{
switch (reg) {
case NVME_REG_CAP: return "Controller Capabilities";
}
}
-char* nvme_select_to_string(int sel)
+const char *nvme_select_to_string(int sel)
{
switch (sel) {
case 0: return "Current";
printf(" Feature is changeable\n");
}
-char *nvme_status_to_string(__u32 status)
+const char *nvme_status_to_string(__u32 status)
{
switch (status & 0x3ff) {
case NVME_SC_SUCCESS: return "SUCCESS: The command completed successfully";
}
}
-static char* nvme_feature_lba_type_to_string(__u8 type)
+static const char *nvme_feature_lba_type_to_string(__u8 type)
{
switch (type) {
case 0: return "Reserved";
}
-static char *nvme_feature_wl_hints_to_string(__u8 wh)
+static const char *nvme_feature_wl_hints_to_string(__u8 wh)
{
switch (wh) {
case 0: return "No Workload";
}
}
-static char *nvme_feature_temp_type_to_string(__u8 type)
+static const char *nvme_feature_temp_type_to_string(__u8 type)
{
switch (type) {
case 0: return "Over Temperature Threshold";
}
}
-static char *nvme_feature_temp_sel_to_string(__u8 sel)
+static const char *nvme_feature_temp_sel_to_string(__u8 sel)
{
switch (sel)
{
return;
}
-static char *nvme_plm_window(__u32 plm)
+static const char *nvme_plm_window(__u32 plm)
{
switch (plm & 0x7) {
case 1:
}
}
-static char *nvme_register_szu_to_string(__u8 szu)
+static const char *nvme_register_szu_to_string(__u8 szu)
{
switch (szu) {
case 0: return "4 KB";
void nvme_feature_show_fields(__u32 fid, unsigned int result, unsigned char *buf);
void nvme_directive_show_fields(__u8 dtype, __u8 doper, unsigned int result, unsigned char *buf);
-char *nvme_status_to_string(__u32 status);
-char *nvme_select_to_string(int sel);
-char *nvme_feature_to_string(int feature);
-char *nvme_register_to_string(int reg);
+const char *nvme_status_to_string(__u32 status);
+const char *nvme_select_to_string(int sel);
+const char *nvme_feature_to_string(int feature);
+const char *nvme_register_to_string(int reg);
void nvme_show_select_result(__u32 result);
void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl, unsigned int mode, void (*vendor_show)(__u8 *vs, struct json_object *root));