aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2004-11-06 09:56:27 +0000
committerDima Dorfman <dd@FreeBSD.org>2004-11-06 09:56:27 +0000
commit9a777b93be6d945e2996d93549f4d0d690e7a35e (patch)
tree5d24705de9bf0fa7299436a46bc954f5e9cf4556 /sbin/mdconfig
parent8bc61209d44a8114387dcdba2dc1b9e0d880bbf7 (diff)
downloadsrc-9a777b93be6d945e2996d93549f4d0d690e7a35e.tar.gz
src-9a777b93be6d945e2996d93549f4d0d690e7a35e.zip
If there aren't any devices to list, output nothing instead of an
empty line. This is consistent with other utilities. While I'm here, remove artifacts of the previous list implementation.
Notes
Notes: svn path=/head/; revision=137300
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r--sbin/mdconfig/mdconfig.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index ac0a88ec8a24..8aa34ac184c6 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -25,8 +25,6 @@
#include <sys/linker.h>
#include <sys/mdioctl.h>
#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <sys/queue.h>
int list(const int);
void mdmaybeload(void);
@@ -247,13 +245,6 @@ main(int argc, char **argv)
return (0);
}
-struct dl {
- int unit;
- SLIST_ENTRY(dl) slist;
-};
-
-SLIST_HEAD(, dl) dlist = SLIST_HEAD_INITIALIZER(&dlist);
-
int
list(const int fd)
{
@@ -267,7 +258,8 @@ list(const int fd)
}
if (mdio.md_pad[0] - unit > 0)
printf(" ... %d more", mdio.md_pad[0] - unit);
- printf("\n");
+ if (unit > 0)
+ printf("\n");
return (0);
}