summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dev.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-07 15:46:53 +0000
committerphk <phk@FreeBSD.org>2003-06-07 15:46:53 +0000
commit8d105bca1c7437f233c22e85bb34a29aa23167d2 (patch)
tree7532e30adb1fbc8c2cb4006ea1db09541093fa33 /sys/geom/geom_dev.c
parentc9fca2ba58122a83e0cdb9fb368520d5548350bc (diff)
downloadFreeBSD-src-8d105bca1c7437f233c22e85bb34a29aa23167d2.zip
FreeBSD-src-8d105bca1c7437f233c22e85bb34a29aa23167d2.tar.gz
Improve the root-dev prompt facility for printing devices which could
possibly be a root filesystem.
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r--sys/geom/geom_dev.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 65ae722..a00ce6a 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -76,19 +76,17 @@ static struct g_class g_dev_class = {
.taste = g_dev_taste,
};
-int
+void
g_dev_print(void)
{
struct g_geom *gp;
+ char const *p = "";
- g_waitidle();
- if (LIST_EMPTY(&g_dev_class.geom))
- return (0);
- printf("List of GEOM disk devices:\n ");
- LIST_FOREACH(gp, &g_dev_class.geom, geom)
- printf(" %s", gp->name);
+ LIST_FOREACH(gp, &g_dev_class.geom, geom) {
+ printf("%s%s", p, gp->name);
+ p = " ";
+ }
printf("\n");
- return (1);
}
/*
OpenPOWER on IntegriCloud