Linux Manual Pages development
 help / color / mirror / Atom feed
* [PATCH] man/man7/mount_namespaces.7: Add missing 'filesystemtype' argument to mount(2)
@ 2026-10-04  8:49 Ben Kuo via B4 Relay
  2026-10-10 18:12 ` Alejandro Colomar
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Kuo via B4 Relay @ 2026-10-04  8:49 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Ben Kuo

From: Ben Kuo <ben.kuo.tw@proton.me>

The example call omits the 'filesystemtype' argument, so it passes
four arguments to mount(2), which takes five.  As written, it fails
to compile:

	error: too few arguments to function 'mount'

Tested by compiling the corrected call with gcc 14.2.0 and running
it after unshare(CLONE_NEWNS) on Linux 6.12 (Debian 13, arm64);
findmnt(8) shows '/' with slave propagation.

Fixes: a2fc45a9f (2019-10-07; "mount_namespaces.7: It may be desirable to disable propagation after creating a namespace")
Signed-off-by: Ben Kuo <ben.kuo.tw@proton.me>
---
 man/man7/mount_namespaces.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/man7/mount_namespaces.7 b/man/man7/mount_namespaces.7
index 8ed43a34623310f5c0b6b2071815340b287415aa..8f9c8e6e147a42b85d9d2cc2c691037ef82395f5 100644
--- a/man/man7/mount_namespaces.7
+++ b/man/man7/mount_namespaces.7
@@ -1051,7 +1051,7 @@ using a call such as the following:
 .P
 .in +4n
 .EX
-mount(NULL, "/", MS_SLAVE | MS_REC, NULL);
+mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL);
 .EE
 .in
 .P

---
base-commit: 31d36870d5f239d485772f1dbf17948bc35bee80
change-id: 20261004-mount-ns-mount-args-98990fdab699

Best regards,
-- 
Ben Kuo <ben.kuo.tw@proton.me>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] man/man7/mount_namespaces.7: Add missing 'filesystemtype' argument to mount(2)
  2026-10-04  8:49 [PATCH] man/man7/mount_namespaces.7: Add missing 'filesystemtype' argument to mount(2) Ben Kuo via B4 Relay
@ 2026-10-10 18:12 ` Alejandro Colomar
  0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2026-10-10 18:12 UTC (permalink / raw)
  To: ben.kuo.tw; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]

Hi Ben,

> Date: 2026-10-04 16:49:17+0800
> From: Ben Kuo via B4 Relay <devnull+ben.kuo.tw.proton.me@kernel.org>
>
> From: Ben Kuo <ben.kuo.tw@proton.me>
> 
> The example call omits the 'filesystemtype' argument, so it passes
> four arguments to mount(2), which takes five.  As written, it fails
> to compile:
> 
> 	error: too few arguments to function 'mount'
> 
> Tested by compiling the corrected call with gcc 14.2.0 and running
> it after unshare(CLONE_NEWNS) on Linux 6.12 (Debian 13, arm64);
> findmnt(8) shows '/' with slave propagation.
> 
> Fixes: a2fc45a9f (2019-10-07; "mount_namespaces.7: It may be desirable to disable propagation after creating a namespace")
> Signed-off-by: Ben Kuo <ben.kuo.tw@proton.me>
> ---

Thanks!  I've applied the patch.


Have a lovely day!
Alex

>  man/man7/mount_namespaces.7 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man/man7/mount_namespaces.7 b/man/man7/mount_namespaces.7
> index 8ed43a34623310f5c0b6b2071815340b287415aa..8f9c8e6e147a42b85d9d2cc2c691037ef82395f5 100644
> --- a/man/man7/mount_namespaces.7
> +++ b/man/man7/mount_namespaces.7
> @@ -1051,7 +1051,7 @@ using a call such as the following:
>  .P
>  .in +4n
>  .EX
> -mount(NULL, "/", MS_SLAVE | MS_REC, NULL);
> +mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL);
>  .EE
>  .in
>  .P
> 
> ---
> base-commit: 31d36870d5f239d485772f1dbf17948bc35bee80
> change-id: 20261004-mount-ns-mount-args-98990fdab699
> 
> Best regards,
> -- 
> Ben Kuo <ben.kuo.tw@proton.me>
> 
> 
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-10 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04  8:49 [PATCH] man/man7/mount_namespaces.7: Add missing 'filesystemtype' argument to mount(2) Ben Kuo via B4 Relay
2026-10-10 18:12 ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox