git: f6b44ffd54be - main - mount: Improve usage message and polish man page descriptions

From: Alexander Ziaee <ziaee_at_FreeBSD.org>
Date: Wed, 30 Apr 2025 20:14:47 UTC
The branch main has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6b44ffd54be4ed701b53069ed8c6c2b60e3e01c

commit f6b44ffd54be4ed701b53069ed8c6c2b60e3e01c
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-04-30 19:52:59 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-04-30 19:52:59 +0000

    mount: Improve usage message and polish man page descriptions
    
    + license: tag spdx, remove dead hyphen
    + -t: fix linter errors, sync to program usage
    + -o ro: explain itself before explaining it's equivalence
    + -o rw: mention
    
    MFC after:              1 week
    Fixes:                  70866c8dbdb6c (Fix synopsis of the -t option)
    Reviewed by:            imp, mhorne, Pat Maddox <pat@patmaddox.com>
    Approved by:            mhorne (mentor)
    Differential Revision:  https://reviews.freebsd.org/D49671
---
 sbin/mount/mount.8 | 19 ++++++++++++-------
 sbin/mount/mount.c |  6 +++---
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8
index feed64bc5c1c..b584d71ea567 100644
--- a/sbin/mount/mount.8
+++ b/sbin/mount/mount.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
 .\" Copyright (c) 1980, 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -25,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 19, 2024
+.Dd April 30, 2025
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -37,7 +40,7 @@
 .Op Fl adflpruvw
 .Op Fl F Ar fstab
 .Op Fl o Ar options
-.Op Fl t Oo Cm no Oc Ns Cm Ar type Ns Op Cm , Ns Ar type ...
+.Op Fl t Oo Cm no Oc Ns Ar type Ns Op , Ns Ar type ...
 .Nm
 .Op Fl -libxo
 .Op Fl dfpruvw
@@ -46,7 +49,7 @@
 .Op Fl -libxo
 .Op Fl dfpruvw
 .Op Fl o Ar options
-.Op Fl t Oo Cm no Oc Ns Cm Ar type Ns Op Cm , Ns Ar type ...
+.Op Fl t Oo Cm no Oc Ns Ar type Ns Op , Ns Ar type ...
 .Ar special node
 .Sh DESCRIPTION
 The
@@ -270,9 +273,11 @@ It is set automatically when the user does not have super-user privileges.
 Do not follow symlinks
 on the mounted file system.
 .It Cm ro
-The same as
-.Fl r ;
-mount the file system read-only (even the super-user may not write it).
+Mount the filesystem read-only, even the super-user may not write it.
+Equivalent to
+.Fl r .
+.It Cm rw
+Mount the filesystem read-write.
 .It Cm snapshot
 Take a snapshot of the specified filesystem.
 When this option is used, all other options are ignored.
@@ -432,7 +437,7 @@ The same as the
 argument to the
 .Fl o
 option.
-.It Fl t Oo Cm no Oc Ns Cm Ar type Ns Op Cm , Ns Ar type ...
+.It Fl t Oo Cm no Oc Ns Ar type Ns Op , Ns Ar type ...
 The argument following the
 .Fl t
 is used to indicate the file system type.
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 03ae69272e1a..496d71b57e4c 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -1,4 +1,4 @@
-/*-
+/*
  * SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -882,9 +882,9 @@ usage(void)
 {
 
 	xo_error("%s\n%s\n%s\n",
-"usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type]",
+"usage: mount [-adflpruvw] [-F fstab] [-o options] [-t [no]type[,type ...]]",
 "       mount [-dfpruvw] special | node",
-"       mount [-dfpruvw] [-o options] [-t ufs | external_type] special node");
+"       mount [-dfpruvw] [-o options] [-t [no]type[,type ...]] special node");
 	EXIT(EXIT_FAILURE);
 }