summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-03-13 16:45:41 +0000
committerpjd <pjd@FreeBSD.org>2005-03-13 16:45:41 +0000
commit17fc089e24a606bf2a901cb2dbe9b8b8447e6988 (patch)
tree34bb8f7271159167af5cbdd37a1f88e08a603ef9 /sbin
parent7297ad65092d433ccdf718a88b8f88f1b2861966 (diff)
downloadFreeBSD-src-17fc089e24a606bf2a901cb2dbe9b8b8447e6988.zip
FreeBSD-src-17fc089e24a606bf2a901cb2dbe9b8b8447e6988.tar.gz
When listing all devices (geoms) from the given class, skip geoms without
providers. This prevents from listing geoms like <name>.sync which can be confusing. It still allows to show details about it by giving its name when listing. MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/core/geom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c
index 126c2eb..b8c0488 100644
--- a/sbin/geom/core/geom.c
+++ b/sbin/geom/core/geom.c
@@ -736,6 +736,8 @@ std_list(struct gctl_req *req, unsigned flags __unused)
}
} else {
LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
+ if (LIST_EMPTY(&gp->lg_provider))
+ continue;
show_one_geom(gp);
}
}
OpenPOWER on IntegriCloud