From 8b9181871196b4cc5133f93f9feb913959118c02 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Fri, 5 Dec 2003 09:22:40 +0000 Subject: [PATCH] Don't include the file system ID in the output of `mount -v' if it is all zeros. The kernel now consistently zeroes FSIDs for non-root users, so there's no point in printing these. Also fix a misspelling in a comment. Submitted by: Rudolf Cejka Approved by: re (scottl) --- sbin/umount/umount.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 4c2b8246771..f2b24446e46 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -365,8 +365,9 @@ umountfs(struct statfs *sfs) warn("unmount of %s failed", sfs->f_mntonname); if (errno != ENOENT) return (1); - /* Compatability for old kernels. */ - warnx("retrying using path instead of file system ID"); + /* Compatibility for old kernels. */ + if (sfs->f_fsid.val[0] != 0 || sfs->f_fsid.val[1] != 0) + warnx("retrying using path instead of file system ID"); if (unmount(sfs->f_mntonname, fflag) != 0) { warn("unmount of %s failed", sfs->f_mntonname); return (1); @@ -557,7 +558,7 @@ mntinfo(struct statfs **mntbuf) } /* - * Convert a hexidecimal filesystem ID to an fsid_t. + * Convert a hexadecimal filesystem ID to an fsid_t. * Returns 0 on success. */ int -- 2.45.2