mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
include: name the fsmount() parameters like the man page
The fsmount() shim took its parameter names from glibc which calls the last one ms_flags. That's misleading as it takes MOUNT_ATTR_* flags and not MS_* flags. The kernel and fsmount(2) call it attr_flags. Use the names from fsmount(2) and fix up the two comments in namespace.c that called it mount_attrs and flags.
This commit is contained in:
3 files changed
+5
-5
No files matched your search
@@ -1809,7 +1809,7 @@ static int mount_bpffs(const MountEntry *m, PidRef *pidref, int socket_fd, int e
|
||||
|
||||
pidref_done(pidref);
|
||||
|
||||
_cleanup_close_ int mnt_fd = fsmount(fs_fd, FSMOUNT_CLOEXEC, /* mount_attrs= */ 0);
|
||||
_cleanup_close_ int mnt_fd = fsmount(fs_fd, FSMOUNT_CLOEXEC, /* attr_flags= */ 0);
|
||||
if (mnt_fd < 0)
|
||||
return log_debug_errno(errno, "Failed to fsmount bpffs: %m");
|
||||
|
||||
@@ -3771,7 +3771,7 @@ static int unpeel_mount_and_setup_overlay(int pair_fd, const char *mount_path) {
|
||||
return log_debug_errno(r, "Failed to receive configured overlay: %m");
|
||||
|
||||
/* Create the mount */
|
||||
mount_fd = fsmount(overlay_fs_fd, FSMOUNT_CLOEXEC, /* flags= */ 0);
|
||||
mount_fd = fsmount(overlay_fs_fd, FSMOUNT_CLOEXEC, /* attr_flags= */ 0);
|
||||
if (mount_fd < 0)
|
||||
return log_debug_errno(errno, "Failed to create overlay mount: %m");
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ int fsopen_shim(const char *fsname, unsigned flags);
|
||||
FLAGS with ATTR_FLAGS describing how the mount is to be performed. */
|
||||
/* Defined since glibc-2.36.
|
||||
* Supported since kernel v5.2 (93766fbd2696c2c4453dd8e1070977e9cd4e6b6d). */
|
||||
int fsmount_shim(int fd, unsigned flags, unsigned ms_flags);
|
||||
int fsmount_shim(int fsfd, unsigned flags, unsigned attr_flags);
|
||||
#define fsmount fsmount_shim
|
||||
|
||||
/* Add the mounted FROM_DFD referenced by FROM_PATHNAME filesystem returned
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@ DEFINE_SYSCALL_SHIM(fsopen, int,
|
||||
unsigned, flags)
|
||||
|
||||
DEFINE_SYSCALL_SHIM(fsmount, int,
|
||||
int, fd,
|
||||
int, fsfd,
|
||||
unsigned, flags,
|
||||
unsigned, ms_flags)
|
||||
unsigned, attr_flags)
|
||||
|
||||
DEFINE_SYSCALL_SHIM(move_mount, int,
|
||||
int, from_dfd,
|
||||
|
||||
Reference in new issue
Block a user