From nobody Wed Apr 30 20:14:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZnpLw1gJCz5tw4y; Wed, 30 Apr 2025 20:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZnpLv4mXDz3GWH; Wed, 30 Apr 2025 20:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746044087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBuvs0FODSBen9LqTQPqodKbfPIR+ZmegWPZsu+JE8I=; b=C3lgZue3Ze7UN2Td/6ad2v8sip49PUlKkbiCGt6dsMcGmYBhs9sDd3+M+Nxp1Oa7jv+Ce6 7evYl81TSMfUzVXumgRDk9qbXn7efUwQ2qXC1OVvXSCfA+Hfh2z3nOQYSecGO3rVMkEiYz QIRfW8xrElmNWKaSOfTbiKSk2XSijVzGNSgrK2I9L7dztd1VBAbS0FcUbo8Oft2R2esMcB ZFVvJ+DdTpGgc+SaUSMlaagLMyT8cuVOvHO5BbNus9H0mL9tnI2ggL0LMkdQIr5hUabvSL QWziSST0qu3hN3JBSvooHdY1JVyloltRgMLxS6TrbMthJdf++rCeEaqpnlLFsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746044087; a=rsa-sha256; cv=none; b=sO40wB6pyaPcdEERxH3TlRATIkfKZIEHH0W/nSK3n6WYhix5B4x6H8kdujMtS4NKJCiVAL nVx0O8DaZXeodQsrtUIMcAwg+pKrWt0mepoVZkuM+uVwDAqxXRH9W+vgJsD1Ze2S/hA1Ps +VMlOnRKTZdETTlvmm2tK4FhFObtDE/MuWrEAOtcRKnvLReXErJHJHXypLeRhUfNinwNiG 1JjGTtmUsXMMa2F9klDAdYVeJyXctuQC3TA178rh537hktdz85g/ay3XMfKiZbAXyv0KOl otvI4SDhcD7u6t9EconB4zN4OVcoKo4cdtl+07JhRiSV6/eP9pvRZj7uLBYM1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746044087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBuvs0FODSBen9LqTQPqodKbfPIR+ZmegWPZsu+JE8I=; b=kApYb2FEKZWo50leQHUlti0qb/nGGeiV8lc3S291FYw1MM6mZdXF5AKkRFdGBzKZaXblWy upoKhx//OpvUnJQIh13pQ91t4JAdiTwovXOD4r+9Jz2Nq56r1prfk1DXxeXM3YW7cGv3gY EqmNtfnzPGWWuFimAPAmsC1GY2+MGQ+2yWvlQOwyE7ZrTPZe5OFMldQFUjG95N2xOgE2iy 1vjIyl7v+WTsseleXhfnMiI1RUM1/D/VhLZZIwVwrWxJwJEfqPCWx4wxoa9QDQx+SqQd0Y F0CZG2v9DOnZ7Emlx1XDA0PaJhSA3V+vBNA8tRZip7tT0QI2nlrgi+5tlGEdzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZnpLv4FXGz4tT; Wed, 30 Apr 2025 20:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53UKElkE016043; Wed, 30 Apr 2025 20:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53UKElhs016040; Wed, 30 Apr 2025 20:14:47 GMT (envelope-from git) Date: Wed, 30 Apr 2025 20:14:47 GMT Message-Id: <202504302014.53UKElhs016040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: f6b44ffd54be - main - mount: Improve usage message and polish man page descriptions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6b44ffd54be4ed701b53069ed8c6c2b60e3e01c Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f6b44ffd54be4ed701b53069ed8c6c2b60e3e01c commit f6b44ffd54be4ed701b53069ed8c6c2b60e3e01c Author: Alexander Ziaee AuthorDate: 2025-04-30 19:52:59 +0000 Commit: Alexander Ziaee 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 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); }