Change the flags type to the type from enum nvme_print_flags.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg,
char *raw, bool connect, bool persistent,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
struct nvmf_discovery_log *log = NULL;
nvme_subsystem_t s = nvme_ctrl_get_subsystem(c);
int argc, ret = 0;
unsigned int verbose = 0;
FILE *f;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
char *format = "normal";
struct nvme_fabrics_config cfg;
bool force = false;
static int discover_from_json_config_file(nvme_root_t r, nvme_host_t h,
const char *desc, bool connect,
const struct nvme_fabrics_config *defcfg,
- enum nvme_print_flags flags,
+ nvme_print_flags_t flags,
bool force)
{
const char *transport, *traddr, *host_traddr, *host_iface, *trsvcid, *subsysnqn;
char *config_file = PATH_NVMF_CONFIG;
char *hnqn = NULL, *hid = NULL;
char *context = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
nvme_root_t r;
nvme_host_t h;
nvme_ctrl_t c = NULL;
nvme_host_t h;
nvme_ctrl_t c;
int ret;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_fabrics_config cfg = { 0 };
char *format = "normal";
char *hostnqn_arg, *hostid_arg;
struct nbft_info_subsystem_ns *ss,
struct tr_config *trcfg,
struct nvme_fabrics_config *cfg,
- enum nvme_print_flags flags,
+ nvme_print_flags_t flags,
unsigned int verbose)
{
nvme_ctrl_t c;
nvme_ctrl_t c,
struct nvme_fabrics_config *defcfg,
struct tr_config *deftrcfg,
- enum nvme_print_flags flags,
+ nvme_print_flags_t flags,
unsigned int verbose)
{
struct nvmf_discovery_log *log = NULL;
char *hostnqn_sys, char *hostid_sys,
const char *desc, bool connect,
struct nvme_fabrics_config *cfg, char *nbft_path,
- enum nvme_print_flags flags, unsigned int verbose)
+ nvme_print_flags_t flags, unsigned int verbose)
{
char *hostnqn = NULL, *hostid = NULL, *host_traddr = NULL;
nvme_host_t h;
char *hostnqn_sys, char *hostid_sys,
const char *desc, bool connect,
struct nvme_fabrics_config *cfg, char *nbft_path,
- enum nvme_print_flags flags, unsigned int verbose);
+ nvme_print_flags_t flags, unsigned int verbose);
.show_error_status = NULL,
};
-struct print_ops *nvme_get_binary_print_ops(enum nvme_print_flags flags)
+struct print_ops *nvme_get_binary_print_ops(nvme_print_flags_t flags)
{
binary_print_ops.flags = flags;
return &binary_print_ops;
.show_error_status = json_output_error_status,
};
-struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags)
+struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags)
{
json_print_ops.flags = flags;
return &json_print_ops;
.show_error_status = stdout_error_status,
};
-struct print_ops *nvme_get_stdout_print_ops(enum nvme_print_flags flags)
+struct print_ops *nvme_get_stdout_print_ops(nvme_print_flags_t flags)
{
stdout_print_ops.flags = flags;
return &stdout_print_ops;
#define nvme_print_output_format(name, ...) \
nvme_print(name, nvme_is_output_format_json() ? JSON : NORMAL, ##__VA_ARGS__);
-static struct print_ops *nvme_print_ops(enum nvme_print_flags flags)
+static struct print_ops *nvme_print_ops(nvme_print_flags_t flags)
{
struct print_ops *ops = NULL;
void nvme_show_predictable_latency_per_nvmset(
struct nvme_nvmset_predictable_lat_log *plpns_log,
__u16 nvmset_id, const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(predictable_latency_per_nvmset, flags,
plpns_log, nvmset_id, devname);
void nvme_show_predictable_latency_event_agg_log(
struct nvme_aggregate_predictable_lat_event *pea_log,
__u64 log_entries, __u32 size, const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(predictable_latency_event_agg_log, flags,
pea_log, log_entries, size, devname);
void nvme_show_persistent_event_log(void *pevent_log_info,
__u8 action, __u32 size, const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(persistent_event_log, flags,
pevent_log_info, action, size, devname);
void nvme_show_endurance_group_event_agg_log(
struct nvme_aggregate_predictable_lat_event *endurance_log,
__u64 log_entries, __u32 size, const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(endurance_group_event_agg_log, flags,
endurance_log, log_entries, size, devname);
}
void nvme_show_lba_status_log(void *lba_status, __u32 size,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(lba_status_log, flags, lba_status, size, devname);
}
}
void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(resv_notification_log, flags, resv, devname);
}
void nvme_show_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(fid_supported_effects_log, flags, fid_log, devname);
}
void nvme_show_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(mi_cmd_support_effects_log, flags,
mi_cmd_log, devname);
}
void nvme_show_boot_part_log(void *bp_log, const char *devname,
- __u32 size, enum nvme_print_flags flags)
+ __u32 size, nvme_print_flags_t flags)
{
nvme_print(boot_part_log, flags, bp_log, devname, size);
}
void nvme_show_phy_rx_eom_log(struct nvme_phy_rx_eom_log *log, __u16 controller,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(phy_rx_eom_log, flags, log, controller);
}
void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus_log,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(media_unit_stat_log, flags, mus_log);
}
void nvme_show_fdp_configs(struct nvme_fdp_config_log *log, size_t len,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(fdp_config_log, flags, log, len);
}
void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(fdp_usage_log, flags,log, len);
}
void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(fdp_stats_log, flags, log);
}
}
void nvme_show_fdp_events(struct nvme_fdp_events_log *log,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(fdp_event_log, flags, log);
}
void nvme_show_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(fdp_ruh_status, flags, status, len);
}
void nvme_show_supported_cap_config_log(
struct nvme_supported_cap_config_list_log *cap,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(supported_cap_config_list_log, flags, cap);
}
void nvme_show_subsystem_list(nvme_root_t r, bool show_ana,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(print_nvme_subsystem_list, flags, r, show_ana);
}
return NVME_PMRCTL_EN(pmrctl);
}
-void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_print_flags flags)
+void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, nvme_print_flags_t flags)
{
uint64_t value;
nvme_print(ctrl_register, flags, offset, value);
}
-void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags)
+void nvme_show_ctrl_registers(void *bar, bool fabrics, nvme_print_flags_t flags)
{
nvme_print(ctrl_registers, flags, bar, fabrics);
}
-void nvme_show_single_property(int offset, uint64_t value64, enum nvme_print_flags flags)
+void nvme_show_single_property(int offset, uint64_t value64, nvme_print_flags_t flags)
{
nvme_print(single_property, flags, offset, value64);
}
va_end(ap);
}
-void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, enum nvme_print_flags flags)
+void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, nvme_print_flags_t flags)
{
nvme_print(id_ctrl_rpmbs, flags, ctrl_rpmbs);
}
void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
- unsigned int lba_index, bool cap_only, enum nvme_print_flags flags)
+ unsigned int lba_index, bool cap_only, nvme_print_flags_t flags)
{
nvme_print(id_ns, flags, ns, nsid, lba_index, cap_only);
}
void nvme_show_cmd_set_independent_id_ns(
struct nvme_id_independent_id_ns *ns, unsigned int nsid,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_independent_id_ns, flags, ns, nsid);
}
-void nvme_show_id_ns_descs(void *data, unsigned int nsid, enum nvme_print_flags flags)
+void nvme_show_id_ns_descs(void *data, unsigned int nsid, nvme_print_flags_t flags)
{
nvme_print(id_ns_descs, flags, data, nsid);
}
-void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
+void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, nvme_print_flags_t flags,
void (*vendor_show)(__u8 *vs, struct json_object *root))
{
nvme_print(id_ctrl, flags, ctrl, vendor_show);
}
void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_ctrl_nvm, flags, ctrl_nvm);
}
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)
+ bool cap_only, nvme_print_flags_t flags)
{
nvme_print(nvm_id_ns, flags, nvm_ns, nsid, ns, lba_index, cap_only);
}
void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_id_ctrl, flags, ctrl);
}
void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns,
struct nvme_id_ns *id_ns,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_id_ns, flags, ns, id_ns);
}
-void nvme_show_list_ns(struct nvme_ns_list *ns_list, enum nvme_print_flags flags)
+void nvme_show_list_ns(struct nvme_ns_list *ns_list, nvme_print_flags_t flags)
{
nvme_print(ns_list, flags, ns_list);
}
void nvme_zns_start_zone_list(__u64 nr_zones, struct json_object **zone_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_start_zone_list, flags, nr_zones, zone_list);
}
void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_changed_zone_log, flags, log);
}
void nvme_zns_finish_zone_list(__u64 nr_zones, struct json_object *zone_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_finish_zone_list, flags, nr_zones, zone_list);
}
void nvme_show_zns_report_zones(void *report, __u32 descs,
__u8 ext_size, __u32 report_size,
struct json_object *zone_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(zns_report_zones, flags,
report, descs, ext_size, report_size, zone_list);
}
void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(ctrl_list, flags, ctrl_list);
}
void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_nvmset_list, flags, nvmset, nvmset_id);
}
void nvme_show_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(primary_ctrl_cap, flags, caps);
}
void nvme_show_list_secondary_ctrl(
const struct nvme_secondary_ctrl_list *sc_list,
- __u32 count, enum nvme_print_flags flags)
+ __u32 count, nvme_print_flags_t flags)
{
__u16 num = sc_list->num;
__u32 entries = min(num, count);
}
void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *glist,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_ns_granularity_list, flags, glist);
}
void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_uuid_list, flags, uuid_list);
}
void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(id_domain_list, flags, id_dom);
}
void nvme_show_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(endurance_group_list, flags, endgrp_list);
}
-void nvme_show_id_iocs(struct nvme_id_iocs *iocs, enum nvme_print_flags flags)
+void nvme_show_id_iocs(struct nvme_id_iocs *iocs, nvme_print_flags_t flags)
{
nvme_print(id_iocs, flags, iocs);
}
}
void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(error_log, flags, err_log, entries, devname);
}
void nvme_show_resv_report(struct nvme_resv_status *status, int bytes,
- bool eds, enum nvme_print_flags flags)
+ bool eds, nvme_print_flags_t flags)
{
nvme_print(resv_report, flags, status, bytes, eds);
}
void nvme_show_fw_log(struct nvme_firmware_slot *fw_log,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(fw_log, flags, fw_log, devname);
}
void nvme_show_changed_ns_list_log(struct nvme_ns_list *log,
const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(ns_list_log, flags, log, devname);
}
void nvme_print_effects_log_pages(struct list_head *list,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(effects_log_list, flags, list);
}
}
void nvme_show_supported_log(struct nvme_supported_log_pages *support_log,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(supported_log_pages, flags, support_log, devname);
}
void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log,
__u16 group_id, const char *devname,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(endurance_log, flags, endurance_log, group_id, devname);
}
}
void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(smart_log, flags, smart, nsid, devname);
}
void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname,
- size_t len, enum nvme_print_flags flags)
+ size_t len, nvme_print_flags_t flags)
{
nvme_print(ana_log, flags, ana_log, devname, len);
}
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)
+ __u32 size, const char *devname, nvme_print_flags_t flags)
{
nvme_print(self_test_log, flags, self_test, dst_entries, size, devname);
}
void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize,
- const char *devname, enum nvme_print_flags flags)
+ const char *devname, nvme_print_flags_t flags)
{
nvme_print(sanitize_log_page, flags, sanitize, devname);
}
}
void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(lba_range, flags, lbrt, nr_ranges);
}
}
void nvme_directive_show(__u8 type, __u8 oper, __u16 spec, __u32 nsid, __u32 result,
- void *buf, __u32 len, enum nvme_print_flags flags)
+ void *buf, __u32 len, nvme_print_flags_t flags)
{
nvme_print(directive, flags, type, oper, spec, nsid, result, buf, len);
}
}
void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(lba_status, flags, list, len);
}
nvme_print(list_item, NORMAL, n);
}
-void nvme_show_list_items(nvme_root_t r, enum nvme_print_flags flags)
+void nvme_show_list_items(nvme_root_t r, nvme_print_flags_t flags)
{
nvme_print(list_items, flags, r);
}
void nvme_show_topology(nvme_root_t r,
enum nvme_cli_topo_ranking ranking,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
if (ranking == NVME_CLI_TOPO_NAMESPACE)
nvme_print(topology_namespace, flags, r);
}
void nvme_show_discovery_log(struct nvmf_discovery_log *log, uint64_t numrec,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
nvme_print(discovery_log, flags, log, numrec);
}
-void nvme_show_connect_msg(nvme_ctrl_t c, enum nvme_print_flags flags)
+void nvme_show_connect_msg(nvme_ctrl_t c, nvme_print_flags_t flags)
{
nvme_print(connect_msg, flags, c);
}
void (*show_status)(int status);
void (*show_error_status)(int status, const char *msg, va_list ap);
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
};
struct nvme_bar_cap {
#ifdef CONFIG_JSONC
-struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags);
+struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags);
#else /* !CONFIG_JSONC */
-static inline struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags) { return NULL; }
+static inline struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags) { return NULL; }
#endif /* !CONFIG_JSONC */
-struct print_ops *nvme_get_stdout_print_ops(enum nvme_print_flags flags);
-struct print_ops *nvme_get_binary_print_ops(enum nvme_print_flags flags);
+struct print_ops *nvme_get_stdout_print_ops(nvme_print_flags_t flags);
+struct print_ops *nvme_get_binary_print_ops(nvme_print_flags_t flags);
void nvme_show_status(int status);
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, enum nvme_print_flags flags);
-void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
+void nvme_show_id_iocs(struct nvme_id_iocs *iocs, nvme_print_flags_t flags);
+void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, nvme_print_flags_t flags,
void (*vendor_show)(__u8 *vs, struct json_object *root));
-void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, enum nvme_print_flags flags);
+void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, nvme_print_flags_t flags);
void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
- unsigned int lba_index, bool cap_only, enum nvme_print_flags flags);
+ unsigned int lba_index, bool cap_only, nvme_print_flags_t flags);
void nvme_show_cmd_set_independent_id_ns(
struct nvme_id_independent_id_ns *ns, unsigned int nsid,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, bool eds,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_supported_log(struct nvme_supported_log_pages *support,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid, const char *devname,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname,
- size_t len, enum nvme_print_flags flags);
+ size_t len, nvme_print_flags_t 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);
+ __u32 size, const char *devname, nvme_print_flags_t flags);
void nvme_show_fw_log(struct nvme_firmware_slot *fw_log, const char *devname,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_print_effects_log_pages(struct list_head *list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_changed_ns_list_log(struct nvme_ns_list *log,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log,
- __u16 group_id, const char *devname, enum nvme_print_flags flags);
+ __u16 group_id, const char *devname, nvme_print_flags_t flags);
void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_predictable_latency_per_nvmset(
struct nvme_nvmset_predictable_lat_log *plpns_log,
- __u16 nvmset_id, const char *devname, enum nvme_print_flags flags);
+ __u16 nvmset_id, const char *devname, nvme_print_flags_t flags);
void nvme_show_predictable_latency_event_agg_log(
struct nvme_aggregate_predictable_lat_event *pea_log,
__u64 log_entries, __u32 size, const char *devname,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_persistent_event_log(void *pevent_log_info,
__u8 action, __u32 size, const char *devname,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_endurance_group_event_agg_log(
struct nvme_aggregate_predictable_lat_event *endurance_log,
__u64 log_entries, __u32 size, const char *devname,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_lba_status_log(void *lba_status, __u32 size,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_boot_part_log(void *bp_log, const char *devname,
- __u32 size, enum nvme_print_flags flags);
+ __u32 size, nvme_print_flags_t flags);
void nvme_show_phy_rx_eom_log(struct nvme_phy_rx_eom_log *log,
- __u16 controller, enum nvme_print_flags flags);
+ __u16 controller, nvme_print_flags_t flags);
void nvme_show_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log,
- const char *devname, enum nvme_print_flags flags);
+ const char *devname, nvme_print_flags_t flags);
void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
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_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_print_flags flags);
-void nvme_show_single_property(int offset, uint64_t prop, enum nvme_print_flags flags);
-void nvme_show_id_ns_descs(void *data, unsigned int nsid, enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
+void nvme_show_ctrl_registers(void *bar, bool fabrics, nvme_print_flags_t flags);
+void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, nvme_print_flags_t flags);
+void nvme_show_single_property(int offset, uint64_t prop, nvme_print_flags_t flags);
+void nvme_show_id_ns_descs(void *data, unsigned int nsid, nvme_print_flags_t flags);
void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len,
- enum nvme_print_flags flags);
-void nvme_show_list_items(nvme_root_t t, enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
+void nvme_show_list_items(nvme_root_t t, nvme_print_flags_t flags);
void nvme_show_subsystem_list(nvme_root_t t, bool show_ana,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *cap,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_list_secondary_ctrl(const struct nvme_secondary_ctrl_list *sc_list,
- __u32 count, enum nvme_print_flags flags);
+ __u32 count, nvme_print_flags_t flags);
void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *glist,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_list_ns(struct nvme_ns_list *ns_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_topology(nvme_root_t t,
enum nvme_cli_topo_ranking ranking,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_feature_show(enum nvme_features_id fid, int sel, unsigned int result);
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 *buf, __u32 len, nvme_print_flags_t flags);
void nvme_show_select_result(enum nvme_features_id fid, __u32 result);
void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm,
- enum nvme_print_flags flags);
+ nvme_print_flags_t 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);
+ bool cap_only, nvme_print_flags_t flags);
void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns,
- struct nvme_id_ns *id_ns, enum nvme_print_flags flags);
+ struct nvme_id_ns *id_ns, nvme_print_flags_t flags);
void nvme_zns_start_zone_list(__u64 nr_zones, struct json_object **zone_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_zns_finish_zone_list(__u64 nr_zones, struct json_object *zone_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_zns_report_zones(void *report, __u32 descs,
__u8 ext_size, __u32 report_size,
struct json_object *zone_list,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void json_nvme_finish_zone_list(__u64 nr_zones,
struct json_object *zone_list);
void nvme_show_list_item(nvme_ns_t n);
void nvme_show_fdp_configs(struct nvme_fdp_config_log *configs, size_t len,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_fdp_events(struct nvme_fdp_events_log *log,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len,
- enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
void nvme_show_discovery_log(struct nvmf_discovery_log *log, uint64_t numrec,
- enum nvme_print_flags flags);
-void nvme_show_connect_msg(nvme_ctrl_t c, enum nvme_print_flags flags);
+ nvme_print_flags_t flags);
+void nvme_show_connect_msg(nvme_ctrl_t c, nvme_print_flags_t flags);
const char *nvme_ana_state_to_string(enum nvme_ana_state state);
const char *nvme_cmd_to_string(int admin, __u8 opcode);
return get_dev(dev, argc, argv, flags);
}
-int validate_output_format(const char *format, enum nvme_print_flags *flags)
+int validate_output_format(const char *format, nvme_print_flags_t *flags)
{
- enum nvme_print_flags f;
+ nvme_print_flags_t f;
if (!format)
return -EINVAL;
bool nvme_is_output_format_json(void)
{
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
if (validate_output_format(nvme_cfg.output_format, &flags))
return false;
_cleanup_free_ struct nvme_smart_log *smart_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
const char *namespace = "(optional) desired namespace";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_ana_log *ana_log = NULL;
size_t max_ana_log_len;
__u32 ana_log_len;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_endurance_group_log *endurance_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
void *bar = NULL;
int err = -1;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct config {
bool human_readable;
_cleanup_free_ struct nvme_supported_log_pages *supports = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
NVME_ARGS(opts);
_cleanup_free_ struct nvme_error_log_page *err_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
struct nvme_id_ctrl ctrl;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_firmware_slot *fw_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_ns_list *changed_ns_list_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_nvmset_predictable_lat_log *plpns_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ struct nvme_id_ctrl *ctrl = NULL;
_cleanup_free_ void *pea_log = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
__u32 log_size;
int err;
struct nvme_persistent_event_log *pevent_collected = NULL;
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
void *pevent_log_info;
int err;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ struct nvme_id_ctrl *ctrl = NULL;
_cleanup_free_ void *endurance_log = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
__u32 log_size;
int err;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ void *lba_status = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
__u32 lslplen;
int err;
_cleanup_free_ struct nvme_resv_notification_log *resv = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
NVME_ARGS(opts);
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ struct nvme_boot_partition *boot = NULL;
_cleanup_free_ __u8 *bp_log = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
_cleanup_file_ int output = -1;
__u32 bpsz = 0;
const char *controller = "Target Controller ID.";
_cleanup_free_ struct nvme_phy_rx_eom_log *phy_rx_eom_log = NULL;
size_t phy_rx_eom_log_len;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
int err = -1;
__u8 lsp_tmp;
_cleanup_free_ struct nvme_media_unit_stat_log *mus = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_supported_cap_config_list_log *cap_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_sanitize_log_page *sanitize_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_fid_supported_effects_log *fid_support_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_mi_cmd_supported_effects_log *mi_cmd_support_log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_ctrl_list *cntlist = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_ns_list *ns_list = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ struct nvme_id_ns *ns = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_id_endurance_group_list *endgrp_list = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
struct plugin *plugin)
{
_cleanup_nvme_root_ nvme_root_t r = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
const char *desc = "Retrieve information for subsystems";
nvme_scan_filter_t filter = NULL;
char *devname;
static int list(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
const char *desc = "Retrieve basic information for all NVMe namespaces";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
_cleanup_nvme_root_ nvme_root_t r = NULL;
int err = 0;
_cleanup_free_ struct nvme_id_ctrl *ctrl = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_id_ctrl_nvm *ctrl_nvm = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
NVME_ARGS(opts);
_cleanup_free_ struct nvme_nvm_id_ns *id_ns = NULL;
_cleanup_free_ struct nvme_id_ns *ns = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_nvm_id_ns *nvm_ns = NULL;
_cleanup_free_ struct nvme_id_ns *ns = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ void *nsdescs = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ struct nvme_id_ns *ns = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_id_independent_id_ns *ns = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err = -1;
struct config {
_cleanup_free_ struct nvme_id_ns_granularity_list *granularity_list = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
NVME_ARGS(opts);
_cleanup_free_ struct nvme_id_nvmset_list *nvmset = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_id_uuid_list *uuid_list = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_id_domain_list *id_domain = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_primary_ctrl_cap *caps = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_secondary_ctrl_list *sc_list = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
_cleanup_free_ struct nvme_self_test_log *log = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err;
struct config {
"show info in readable format in case of output_format == normal";
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
bool fabrics = false;
void *bar;
int err;
}
static bool get_register_offset(void *bar, bool fabrics, struct get_reg_config *cfg,
- enum nvme_print_flags flags)
+ nvme_print_flags_t flags)
{
bool offset_matched = cfg->offset >= 0;
int offset;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
int err;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
bool fabrics = false;
void *bar;
_cleanup_free_ struct nvme_resv_status *status = NULL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int err, size;
struct config {
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ void *buf = NULL;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
unsigned long buf_len;
int err;
const char *desc = "Read directive parameters of the specified directive type.";
const char *nsr = "namespace stream requested";
- enum nvme_print_flags flags = NORMAL;
+ nvme_print_flags_t flags = NORMAL;
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
_cleanup_free_ void *buf = NULL;
__u32 result;
{
const char *desc = "Show the topology\n";
const char *ranking = "Ranking order: namespace|ctrl";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
_cleanup_nvme_root_ nvme_root_t r = NULL;
enum nvme_cli_topo_ranking rank;
int err;
FAHRENHEIT = 1 << 4, /* show temperatures in degrees fahrenheit */
};
+typedef uint32_t nvme_print_flags_t;
+
enum nvme_cli_topo_ranking {
NVME_CLI_TOPO_NAMESPACE,
NVME_CLI_TOPO_CTRL,
extern const char *output_format;
-int validate_output_format(const char *format, enum nvme_print_flags *flags);
+int validate_output_format(const char *format, nvme_print_flags_t *flags);
bool nvme_is_output_format_json(void);
int __id_ctrl(int argc, char **argv, struct command *cmd,
struct plugin *plugin, void (*vs)(uint8_t *vs, struct json_object *root));
const char *human_readable = "show log in readable format";
const char *raw = "use binary output";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
struct nvme_fdp_config_log hdr;
void *log = NULL;
const char *egid = "Endurance group identifier";
const char *raw = "use binary output";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
struct nvme_fdp_ruhu_log hdr;
size_t len;
const char *egid = "Endurance group identifier";
const char *raw = "use binary output";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
struct nvme_fdp_stats_log stats;
int err;
const char *host_events = "Get host events";
const char *raw = "use binary output";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
struct nvme_fdp_events_log events;
int err;
const char *namespace_id = "Namespace identifier";
const char *raw = "use binary output";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
struct nvme_fdp_ruh_status hdr;
size_t len;
struct huawei_list_item *list_items;
unsigned int i, n, ret;
unsigned int huawei_num = 0;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
const char *desc = "Retrieve basic information for the given huawei device";
struct config {
char *output_format;
struct list_head nbft_list;
char *format = "normal";
char *nbft_path = NBFT_SYSFS_PATH;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int ret;
bool show_subsys = false, show_hfi = false, show_discovery = false;
unsigned int verbose = 0;
}
if (!err) {
- enum nvme_print_flags print_flag;
+ nvme_print_flags_t print_flag;
err = validate_output_format(format, &print_flag);
if (err < 0) {
static int get_c3_log_page(struct nvme_dev *dev, char *format)
{
struct ssd_latency_monitor_log *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i;
static int get_c5_log_page(struct nvme_dev *dev, char *format)
{
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i;
static int get_c1_log_page(struct nvme_dev *dev, char *format)
{
struct ocp_error_recovery_log_page *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i, j;
static int get_c4_log_page(struct nvme_dev *dev, char *format)
{
struct ocp_device_capabilities_log_page *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i, j;
int ret = 0;
__u8 *header_data;
struct telemetry_str_log_format *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *full_log_buf_data = NULL;
__le64 stat_id_str_table_ofst = 0;
__le64 event_str_table_ofst = 0;
static int get_c7_log_page(struct nvme_dev *dev, char *format)
{
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i;
static int get_c0_log_page(int fd, char *format)
{
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *data;
int i;
int ret;
int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
const char *desc = "Get and parse Solidigm vendor specific garbage collection event log.";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
int err;
__u8 uuid_index;
const char *desc = "Get drive HW information";
const char *FTL_unit_size_str = "FTL_unit_size";
char *output_format = "normal";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
nvme_root_t r;
nvme_ctrl_t c;
nvme_ns_t n;
int fd;
__u8 uuid_index;
struct config cfg;
- enum nvme_print_flags print_flags;
+ nvme_print_flags_t print_flags;
struct latency_statistics stats;
struct json_object *bucket_list;
__u32 bucket_list_size;
}
if (!err) {
- enum nvme_print_flags print_flag;
+ nvme_print_flags_t print_flag;
err = validate_output_format(format, &print_flag);
if (err < 0) {
"Get Solidigm vendor specific smart log (optionally, for the specified namespace), and show it.";
const int solidigm_vu_smart_log_id = 0xCA;
struct vu_smart_log smart_log_payload;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
int err;
__u8 uuid_index;
__u32 namespace_id)
{
uint32_t device_id, read_vendor_id;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
__u8 log_id;
{
uint32_t read_device_id, read_vendor_id;
struct wdc_ssd_ca_perf_stats *perf;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u32 cust_id;
__u8 *data;
int ret;
struct wdc_log_page_subpage_header *sph;
struct wdc_ssd_perf_stats *perf;
struct wdc_log_page_header *l;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int total_subpages;
int skip_cnt = 4;
__u8 *data;
static int wdc_get_c3_log_page(nvme_root_t r, struct nvme_dev *dev, char *format)
{
struct wdc_ssd_latency_monitor_log *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *data;
int ret;
int i;
static int wdc_get_ocp_c1_log_page(nvme_root_t r, struct nvme_dev *dev, char *format)
{
struct wdc_ocp_c1_error_recovery_log *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *data;
int ret;
int i;
static int wdc_get_ocp_c4_log_page(nvme_root_t r, struct nvme_dev *dev, char *format)
{
struct wdc_ocp_C4_dev_cap_log *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *data;
int ret;
int i;
static int wdc_get_ocp_c5_log_page(nvme_root_t r, struct nvme_dev *dev, char *format)
{
struct wdc_ocp_C5_unsupported_reqs *log_data;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
int i;
static int wdc_get_d0_log_page(nvme_root_t r, struct nvme_dev *dev, char *format)
{
struct wdc_ssd_d0_smart_log *perf;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret = 0;
__u8 *data;
const char *log_page_version = "Log Page Version: 0 = vendor, 1 = WDC";
const char *log_page_mask = "Log Page Mask, comma separated list: 0xC0, 0xC1, 0xCA, 0xD0";
const char *namespace_id = "desired namespace id";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
struct nvme_dev *dev;
nvme_root_t r;
int ret = 0;
{
const char *desc = "Retrieve Cloud Log Smart/Health Information";
const char *namespace_id = "desired namespace id";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u64 capabilities = 0;
struct nvme_dev *dev;
nvme_root_t r;
{
const char *desc = "Retrieve Hardware Revision Log Information";
const char *namespace_id = "desired namespace id";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u64 capabilities = 0;
struct nvme_dev *dev;
int ret;
const char *desc = "Retrieve Device Write Amplication Factor";
const char *namespace_id = "desired namespace id";
struct nvme_smart_log smart_log;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
struct nvme_dev *dev;
__u8 *data;
nvme_root_t r;
char *format)
{
struct wdc_fw_act_history_log_hdr *fw_act_history_hdr;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
int ret;
__u8 *data;
__u32 tot_entries = 0, num_entries = 0;
__u32 vendor_id = 0, device_id = 0;
__u32 cust_id = 0;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
__u8 *data;
int ret;
bool c2GuidMatch = false;
struct plugin *plugin)
{
const char *desc = "Retrieve Log Page Directory.";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
struct nvme_dev *dev;
int ret = 0;
nvme_root_t r;
static int wdc_do_vs_nand_stats_sn810_2(struct nvme_dev *dev, char *format)
{
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
uint8_t *data = NULL;
int ret;
static int wdc_do_vs_nand_stats(struct nvme_dev *dev, char *format)
{
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
uint8_t *output = NULL;
__u16 version = 0;
int ret;
struct plugin *plugin)
{
const char *desc = "Retrieve PCIE statistics.";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
struct nvme_dev *dev;
nvme_root_t r;
int ret;
struct command *command, struct plugin *plugin)
{
const char *desc = "Send a vs-drive-info command.";
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
nvme_root_t r;
uint64_t capabilities = 0;
struct nvme_dev *dev;
const char *desc = "Send a vs-temperature-stats command.";
struct nvme_smart_log smart_log;
struct nvme_id_ctrl id_ctrl;
- enum nvme_print_flags fmt;
+ nvme_print_flags_t fmt;
struct nvme_dev *dev;
nvme_root_t r;
uint64_t capabilities = 0;
"the given device and report information about the specified\n"
"controller in various formats.";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_zns_id_ctrl ctrl;
struct nvme_dev *dev;
int err = -1;
const char *vendor_specific = "dump binary vendor fields";
const char *human_readable = "show identify in readable format";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_zns_id_ns ns;
struct nvme_id_ns id_ns;
struct nvme_dev *dev;
const char *partial = "Zone Receive Action Specific Features(Partial Report)";
const char *data_len = "length of data in bytes";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
void *data = NULL;
int err = -1;
const char *part = "set to use the partial report";
const char *verbose = "show report zones verbosity";
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
int zdes = 0, err = -1;
struct nvme_dev *dev;
__u32 report_size;
const char *rae = "retain an asynchronous event";
struct nvme_zns_changed_zone_log log;
- enum nvme_print_flags flags;
+ nvme_print_flags_t flags;
struct nvme_dev *dev;
int err = -1;