]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print-json: Change order list functions and set NULL if unimplemented
authorTokunori Ikegami <ikegami.t@gmail.com>
Fri, 29 Sep 2023 12:07:17 +0000 (21:07 +0900)
committerDaniel Wagner <wagi@monom.org>
Sat, 7 Oct 2023 12:56:05 +0000 (14:56 +0200)
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
nvme-print-json.c

index 485c013fa7c22e8424c42c086bc00a048fb7966e..840f64d11e39164a1aea2a661712b9944a304b9d 100644 (file)
@@ -3029,11 +3029,13 @@ static void json_output_perror(const char *msg)
 }
 
 static struct print_ops json_print_ops = {
+       /* libnvme types.h print functions */
        .ana_log                        = json_ana_log,
        .boot_part_log                  = json_boot_part_log,
        .phy_rx_eom_log                 = json_phy_rx_eom_log,
        .ctrl_list                      = json_nvme_list_ctrl,
        .ctrl_registers                 = json_ctrl_registers,
+       .directive                      = NULL,
        .discovery_log                  = json_discovery_log,
        .effects_log_list               = json_effects_log_list,
        .endurance_group_event_agg_log  = json_endurance_group_event_agg_log,
@@ -3048,20 +3050,22 @@ static struct print_ops json_print_ops = {
        .fid_supported_effects_log      = json_fid_support_effects_log,
        .fw_log                         = json_fw_log,
        .id_ctrl                        = json_nvme_id_ctrl,
-       .ns_list                        = json_nvme_list_ns,
-       .nvm_id_ns                      = json_nvme_nvm_id_ns,
        .id_ctrl_nvm                    = json_nvme_id_ctrl_nvm,
        .id_domain_list                 = json_id_domain_list,
        .id_independent_id_ns           = json_nvme_cmd_set_independent_id_ns,
+       .id_iocs                        = NULL,
        .id_ns                          = json_nvme_id_ns,
        .id_ns_descs                    = json_nvme_id_ns_descs,
        .id_ns_granularity_list         = json_nvme_id_ns_granularity_list,
        .id_nvmset_list                 = json_nvme_id_nvmset,
        .id_uuid_list                   = json_nvme_id_uuid_list,
+       .lba_status                     = NULL,
        .lba_status_log                 = json_lba_status_log,
        .media_unit_stat_log            = json_media_unit_stat_log,
        .mi_cmd_support_effects_log     = json_mi_cmd_support_effects_log,
+       .ns_list                        = json_nvme_list_ns,
        .ns_list_log                    = json_changed_ns_list_log,
+       .nvm_id_ns                      = json_nvme_nvm_id_ns,
        .persistent_event_log           = json_persistent_event_log,
        .predictable_latency_event_agg_log = json_predictable_latency_event_agg_log,
        .predictable_latency_per_nvmset = json_predictable_latency_per_nvmset,
@@ -3070,21 +3074,30 @@ static struct print_ops json_print_ops = {
        .resv_report                    = json_nvme_resv_report,
        .sanitize_log_page              = json_sanitize_log,
        .secondary_ctrl_list            = json_nvme_list_secondary_ctrl,
+       .select_result                  = NULL,
        .self_test_log                  = json_self_test_log,
+       .single_property                = NULL,
        .smart_log                      = json_smart_log,
        .supported_cap_config_list_log  = json_supported_cap_config_log,
        .supported_log_pages            = json_support_log,
        .zns_changed_zone_log           = NULL,
-       .zns_report_zones               = json_nvme_zns_report_zones,
        .zns_finish_zone_list           = json_zns_finish_zone_list,
        .zns_id_ctrl                    = json_nvme_zns_id_ctrl,
        .zns_id_ns                      = json_nvme_zns_id_ns,
+       .zns_report_zones               = json_nvme_zns_report_zones,
+       .show_feature_fields            = NULL,
+       .id_ctrl_rpmbs                  = NULL,
+       .lba_range                      = NULL,
+       .lba_status_info                = NULL,
 
+       /* libnvme tree print functions */
+       .list_item                      = NULL,
        .list_items                     = json_print_list_items,
        .print_nvme_subsystem_list      = json_print_nvme_subsystem_list,
        .topology_ctrl                  = json_simple_topology,
        .topology_namespace             = json_simple_topology,
 
+       /* status and error messages */
        .connect_msg                    = json_connect_msg,
        .show_message                   = json_output_message,
        .show_perror                    = json_output_perror,