NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59501: umount: absent -v is silent, with -v gives too much noise
>Number: 59501
>Category: bin
>Synopsis: umount: absent -v is silent, with -v gives too much noise
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 02 01:05:00 +0000 2025
>Originator: Greywolf
>Release: NetBSD 10.1
>Organization:
>Environment:
NetBSD valentina.serenity.starwolf.com 10.1 NetBSD 10.1 (VALENTINA) #3: Sun Jun 29 12:09:29 PDT 2025 root@:/usr/src/sys/arch/amd64/compile/VALENTINA amd64
>Description:
Similar to 'mount -v', the output from 'umount -v' gives (what I think is) too much info ("Trying unmount program" ... "(No separate unmount program.)") in addition to showing what gets unmounted. I would expect the extended info to be provided with additional instances of '-v'.
I have submitted a patch below, done my best not to deviate from the NetBSD style. This may seem egregious, but if it is not an acceptable patch I should like to know why.
>How-To-Repeat:
WHAT I DO:
# umount -v /build
WHAT I EXPECT:
/dev/ld0k: unmount from /build
#
WHAT I GET:
/dev/ld0k: unmount from /build
Trying unmount program umount_ffs
(No separate unmount program.)
#
>Fix:
--- umount.c.orig 2025-06-29 14:04:24.334557542 -0700
+++ umount.c 2025-06-29 14:11:05.687333437 -0700
@@ -130,7 +130,7 @@
typelist = makevfslist(optarg);
break;
case 'v':
- verbose = 1;
+ verbose++;
break;
#endif /* !SMALL */
default:
@@ -275,7 +275,7 @@
if (verbose) {
(void)printf("%s: unmount from %s\n", name, mntpt);
/* put this before the test of FAKE */
- if (!raw) {
+ if (!raw && verbose > 1) {
(void)printf("Trying unmount program %s\n",
umountprog);
}
@@ -308,7 +308,7 @@
}
#ifndef SMALL
- if (verbose)
+ if (verbose > 1)
(void)printf("(No separate unmount program.)\n");
#endif
--- umount.8.orig 2025-06-29 15:01:30.930607016 -0700
+++ umount.8 2025-06-29 14:17:56.481070826 -0700
@@ -154,8 +154,9 @@
and
.Tn MFS .
.It Fl v
-Verbose, additional information is printed out as each file system
-is unmounted.
+Verbose mode. List each filesystem as it is unmounted.
+If this flag is specified more than once, additional information is printed out as each
+file system is unmounted.
.El
.Sh FILES
.Bl -tag -width /etc/fstab -compact
Home |
Main Index |
Thread Index |
Old Index