diff options
Diffstat (limited to 'plugins/nbft')
-rw-r--r-- | plugins/nbft/nbft-plugin.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/nbft/nbft-plugin.c b/plugins/nbft/nbft-plugin.c index 1bb60be..f25941a 100644 --- a/plugins/nbft/nbft-plugin.c +++ b/plugins/nbft/nbft-plugin.c @@ -531,11 +531,10 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) 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; - nvme_root_t r; OPT_ARGS(opts) = { OPT_FMT("output-format", 'o', &format, "Output format: normal|json"), @@ -552,14 +551,12 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) return ret; log_level = map_log_level(verbose, false /* quiet */); + nvme_init_default_logging(stderr, log_level, false, false); ret = validate_output_format(format, &flags); if (ret < 0) return ret; - /* initialize libnvme logging */ - r = nvme_create_root(stderr, log_level); - if (!(show_subsys || show_hfi || show_discovery)) show_subsys = show_hfi = show_discovery = true; @@ -572,6 +569,5 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) ret = json_show_nbfts(&nbft_list, show_subsys, show_hfi, show_discovery); free_nbfts(&nbft_list); } - nvme_free_tree(r); return ret; } |