If the host is connected to the target with two different hostnqn we can
have the situation where a namespace is only reachable via one ctrl and
a second namespace only by a different controller. Thus we should only
show a namespace in the topology if there is a path.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
if (ranking == NVME_CLI_TOPO_NAMESPACE) {
nvme_subsystem_for_each_ns(s, n) {
+ if (!nvme_namespace_first_path(n))
+ continue;
+
printf(" +- ns %d\n", nvme_ns_get_nsid(n));
printf(" \\\n");