From: Aleksa Sarai Date: Fri, 19 Sep 2025 01:59:42 +0000 (+1000) Subject: man/man2/mount_setattr.2, man/man2type/mount_attr.2type: Move mount_attr struct to... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1095951d5ab6b27ea1579cadf8fe3e550c7191d;p=thirdparty%2Fman-pages.git man/man2/mount_setattr.2, man/man2type/mount_attr.2type: Move mount_attr struct to new page mount_attr(2type) As with open_how(2type), it makes sense to move this to a separate man page. In addition, future man pages added in this patchset will want to reference mount_attr(2type). Signed-off-by: Aleksa Sarai Message-ID: <20250919-new-mount-api-v4-1-1261201ab562@cyphar.com> Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/mount_setattr.2 b/man/man2/mount_setattr.2 index 586633f48..4b55f6d2e 100644 --- a/man/man2/mount_setattr.2 +++ b/man/man2/mount_setattr.2 @@ -114,18 +114,11 @@ The .I attr argument of .BR mount_setattr () -is a structure of the following form: -.P -.in +4n -.EX -struct mount_attr { - __u64 attr_set; /* Mount properties to set */ - __u64 attr_clr; /* Mount properties to clear */ - __u64 propagation; /* Mount propagation type */ - __u64 userns_fd; /* User namespace file descriptor */ -}; -.EE -.in +is a pointer to a +.I mount_attr +structure, +described in +.BR mount_attr (2type). .P The .I attr_set diff --git a/man/man2type/mount_attr.2type b/man/man2type/mount_attr.2type new file mode 100644 index 000000000..f5c4f48be --- /dev/null +++ b/man/man2type/mount_attr.2type @@ -0,0 +1,61 @@ +.\" Copyright, the authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mount_attr 2type (date) "Linux man-pages (unreleased)" +.SH NAME +mount_attr \- what mount properties to set and clear +.SH LIBRARY +Linux kernel headers +.SH SYNOPSIS +.EX +.B #include +.P +.B struct mount_attr { +.BR " u64 attr_set;" " /* Mount properties to set */" +.BR " u64 attr_clr;" " /* Mount properties to clear */" +.BR " u64 propagation;" " /* Mount propagation type */" +.BR " u64 userns_fd;" " /* User namespace file descriptor */" + /* ... */ +.B }; +.EE +.SH DESCRIPTION +Specifies which mount properties should be changed with +.BR mount_setattr (2). +.P +The fields are as follows: +.TP +.I .attr_set +This field specifies which +.BI MOUNT_ATTR_ * +attribute flags to set. +.TP +.I .attr_clr +This field specifies which +.BI MOUNT_ATTR_ * +attribute flags to clear. +.TP +.I .propagation +This field specifies what mount propagation will be applied. +The valid values of this field are the same propagation types described in +.BR mount_namespaces (7). +.TP +.I .userns_fd +This field specifies a file descriptor that indicates which user namespace to +use as a reference for ID-mapped mounts with +.BR MOUNT_ATTR_IDMAP . +.SH STANDARDS +Linux. +.SH HISTORY +Linux 5.12. +.\" commit 2a1867219c7b27f928e2545782b86daaf9ad50bd +glibc 2.36. +.P +Extra fields may be appended to the structure, +with a zero value in a new field resulting in +the kernel behaving as though that extension field was not present. +Therefore, a user +.I must +zero-fill this structure on initialization. +.SH SEE ALSO +.BR mount_setattr (2)