Depending on the ranking command line argument we are supposed to show the
topology order by namespaces or ctrls.
Fixes: 1d583b7856db ("nvme-print-stdout: Refactor stdout print code to use print_ops")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
enum nvme_cli_topo_ranking ranking,
enum nvme_print_flags flags)
{
- nvme_print(topology_namespace, flags, r);
+ if (ranking == NVME_CLI_TOPO_NAMESPACE) {
+ nvme_print(topology_namespace, flags, r);
+ } else {
+ nvme_print(topology_ctrl, flags, r);
+ }
}
void nvme_show_message(bool error, const char *msg, ...)