From c4059a45265624ab46d18d12b61aeaf37588c69b Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 28 Jan 1997 04:21:25 +0000 Subject: [PATCH] Only print the partition if doing multiple devices. --- sbin/fsirand/fsirand.c | 7 ++++--- 1 file 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 @@ -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 @@ -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; -- 2.20.1