}
}
-void nvme_show_single_property(int offset, uint64_t value64, int human)
+void nvme_show_single_property(int offset, uint64_t value64, enum nvme_print_flags flags)
{
uint32_t value32;
+ int human = flags & VERBOSE;
if (!human) {
if (nvme_is_64bit_reg(offset))
printf("\tUnallocated NVM Capacity (UNVMCAP)\n\n");
}
-void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs)
+void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, enum nvme_print_flags flags)
{
__u32 rpmbs = le32_to_cpu(ctrl_rpmbs);
__u32 asz = (rpmbs & 0xFF000000) >> 24;
nvme_show_id_ctrl_unvmcap(ctrl->unvmcap);
printf("rpmbs : %#x\n", le32_to_cpu(ctrl->rpmbs));
if (human)
- nvme_show_id_ctrl_rpmbs(ctrl->rpmbs);
+ nvme_show_id_ctrl_rpmbs(ctrl->rpmbs, flags);
printf("edstt : %d\n", le16_to_cpu(ctrl->edstt));
printf("dsto : %d\n", ctrl->dsto);
printf("fwug : %d\n", ctrl->fwug);
}
}
-void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, unsigned int mode)
+void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl,
+ enum nvme_print_flags flags)
{
- if (mode & BINARY)
+ if (flags & BINARY)
return d_raw((unsigned char *)ctrl, sizeof(*ctrl));
- else if (mode & JSON)
+ else if (flags & JSON)
return json_nvme_zns_id_ctrl(ctrl);
printf("NVMe ZNS Identify Controller:\n");
}
void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns,
- struct nvme_id_ns *id_ns, unsigned long flags)
+ struct nvme_id_ns *id_ns,
+ enum nvme_print_flags flags)
{
int human = flags & VERBOSE, vs = flags & VS;
uint8_t lbaf;
}
void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log,
- unsigned long flags)
+ enum nvme_print_flags flags)
{
uint16_t nrzid;
int i;
}
void nvme_show_zns_report_zones(void *report, __u32 descs,
- __u8 ext_size, __u32 report_size, unsigned long flags,
- struct json_object *zone_list)
+ __u8 ext_size, __u32 report_size,
+ struct json_object *zone_list,
+ enum nvme_print_flags flags)
{
struct nvme_zone_report *r = report;
struct nvme_zns_desc *desc;
}
}
-void nvme_show_id_iocs(struct nvme_id_iocs *iocs)
+void nvme_show_id_iocs(struct nvme_id_iocs *iocs, enum nvme_print_flags flags)
{
__u16 i;
free(stream_location);
}
-void nvme_print_effects_log_page(enum nvme_csi csi, struct nvme_cmd_effects_log *effects, int flags) {
+void nvme_print_effects_log_page(enum nvme_csi csi,
+ struct nvme_cmd_effects_log *effects,
+ enum nvme_print_flags flags)
+{
int human = flags & VERBOSE;
switch (csi) {
}
void nvme_print_effects_log_pages(struct list_head *list,
- int flags)
+ enum nvme_print_flags flags)
{
if (flags & JSON)
return json_effects_log_list(list);
}
void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname,
- enum nvme_print_flags flags, size_t len)
+ size_t len, enum nvme_print_flags flags)
{
int offset = sizeof(struct nvme_ana_log);
struct nvme_ana_log *hdr = ana_log;
}
}
-void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges)
+void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges,
+ enum nvme_print_flags flags)
{
int i, j;
field = result & 0x0000003f;
printf("\tNumber of LBA Ranges (NUM): %u\n", field + 1);
if (buf)
- nvme_show_lba_range((struct nvme_lba_range_type *)buf, field);
+ nvme_show_lba_range((struct nvme_lba_range_type *)buf, field, 0);
break;
case NVME_FEAT_FID_TEMP_THRESH:
field = (result & 0x00300000) >> 20;
}
}
-void nvme_show_topology(nvme_root_t r, enum nvme_print_flags flags,
- enum nvme_cli_topo_ranking ranking)
+void nvme_show_topology(nvme_root_t r,
+ enum nvme_cli_topo_ranking ranking,
+ enum nvme_print_flags flags)
{
if (flags & JSON)
json_simple_topology(r);
void nvme_show_lba_status_info(__u32 result);
void nvme_show_relatives(const char *name);
-void nvme_show_id_iocs(struct nvme_id_iocs *iocs);
+void nvme_show_id_iocs(struct nvme_id_iocs *iocs, enum nvme_print_flags flags);
void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
void (*vendor_show)(__u8 *vs, struct json_object *root));
void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
enum nvme_print_flags flags);
void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, bool eds,
enum nvme_print_flags flags);
-void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges);
+void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges,
+ enum nvme_print_flags flags);
void nvme_show_supported_log(struct nvme_supported_log_pages *support,
const char *devname, enum nvme_print_flags flags);
void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
const char *devname, enum nvme_print_flags flags);
void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname,
- enum nvme_print_flags flags, size_t len);
+ size_t len, enum nvme_print_flags flags);
void nvme_show_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries,
__u32 size, const char *devname, enum nvme_print_flags flags);
void nvme_show_fw_log(struct nvme_firmware_slot *fw_log, const char *devname,
enum nvme_print_flags flags);
-void nvme_print_effects_log_pages(struct list_head *list, int flags);
+void nvme_print_effects_log_pages(struct list_head *list,
+ enum nvme_print_flags flags);
void nvme_show_changed_ns_list_log(struct nvme_ns_list *log,
const char *devname, enum nvme_print_flags flags);
void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log,
void nvme_show_supported_cap_config_log(struct nvme_supported_cap_config_list_log *caplog,
enum nvme_print_flags flags);
void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags);
-void nvme_show_single_property(int offset, uint64_t prop, int human);
+void nvme_show_single_property(int offset, uint64_t prop, enum nvme_print_flags flags);
void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flags);
void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len,
enum nvme_print_flags flags);
enum nvme_print_flags flags);
void nvme_show_list_ns(struct nvme_ns_list *ns_list,
enum nvme_print_flags flags);
-void nvme_show_topology(nvme_root_t t, enum nvme_print_flags flags,
- enum nvme_cli_topo_ranking ranking);
+void nvme_show_topology(nvme_root_t t,
+ enum nvme_cli_topo_ranking ranking,
+ enum nvme_print_flags flags);
void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, unsigned char *buf);
void nvme_directive_show(__u8 type, __u8 oper, __u16 spec, __u32 nsid, __u32 result,
void *buf, __u32 len, enum nvme_print_flags flags);
void nvme_show_select_result(__u32 result);
-void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, unsigned int mode);
+void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl,
+ enum nvme_print_flags flags);
void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm,
enum nvme_print_flags flags);
void nvme_show_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid,
struct nvme_id_ns *ns, unsigned int lba_index,
bool cap_only, enum nvme_print_flags flags);
void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns,
- struct nvme_id_ns *id_ns, unsigned long flags);
-void nvme_show_zns_changed( struct nvme_zns_changed_zone_log *log,
- unsigned long flags);
+ struct nvme_id_ns *id_ns, enum nvme_print_flags flags);
+void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log,
+ enum nvme_print_flags flags);
void nvme_show_zns_report_zones(void *report, __u32 descs,
- __u8 ext_size, __u32 report_size, unsigned long flags,
- struct json_object *zone_list);
+ __u8 ext_size, __u32 report_size,
+ struct json_object *zone_list,
+ enum nvme_print_flags flags);
void json_nvme_finish_zone_list(__u64 nr_zones,
struct json_object *zone_list);
void nvme_show_list_item(nvme_ns_t n);