diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-28 04:21:26 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-28 04:21:26 +0000 |
commit | 20908fe39af50d89e8690b74cc745dc17ae12a8e (patch) | |
tree | 26bbd68da70d69c4f182bef722f1fb0a9c11d172 /sbin/fsirand | |
parent | 70915f780441ec0f7a3fd582e4e684654e599121 (diff) |
Only print the partition if doing multiple devices.
Diffstat (limited to 'sbin/fsirand')
-rw-r--r-- | sbin/fsirand/fsirand.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 6f8c21320dd..9e5d9af6057 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.3 1997/01/28 04:14:55 millert Exp $ */ +/* $OpenBSD: fsirand.c,v 1.4 1997/01/28 04:21:25 millert Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsirand.c,v 1.3 1997/01/28 04:14:55 millert Exp $"; +static char rcsid[] = "$OpenBSD: fsirand.c,v 1.4 1997/01/28 04:21:25 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -79,6 +79,8 @@ main(argc, argv) usage(1); for (n = optind; n < argc; n++) { + if (argc - optind != 1) + (void)puts(argv[n]); fsirand(argv[n]); if (n < argc - 1) putchar('\n'); @@ -105,7 +107,6 @@ fsirand(device) if ((devfd = opendev(device, printonly ? O_RDONLY : O_RDWR, OPENDEV_PART, &devpath)) < 0) err(1, "Can't open %s", devpath); - (void)puts(devpath); (void)memset(&sbuf, 0, sizeof(sbuf)); sblock = (struct fs *)&sbuf; |