]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: move nsfs ioctls from missing_fs to missing_namespace
authorMike Yuan <me@yhndnzj.com>
Wed, 8 Jan 2025 11:25:04 +0000 (12:25 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 11 Jan 2025 14:53:14 +0000 (15:53 +0100)
Addresses https://github.com/systemd/systemd/pull/35833#discussion_r1905333757

src/basic/missing_fs.h
src/basic/missing_namespace.h

index ed6bdf04267d82655286ab66f7c3a45fbba667a9..60b0a3a2a76fd82d3af8fee1b4101c647005d874 100644 (file)
@@ -89,30 +89,17 @@ assert_cc(MS_STRICTATIME == (1 << 24));
 assert_cc(MS_LAZYTIME == (1<<25));
 #endif
 
-/* Not exposed yet. Defined at fs/ext4/ext4.h */
-#ifndef EXT4_IOC_RESIZE_FS
-#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
-#endif
-
-/* linux/nsfs.h */
-#ifndef NS_GET_USERNS /* 6786741dbf99e44fb0c0ed85a37582b8a26f1c3b (4.9) */
-#define NS_GET_USERNS _IO(0xb7, 0x1)
-#endif
-
-#ifndef NS_GET_NSTYPE /* e5ff5ce6e20ee22511398bb31fb912466cf82a36 (4.11) */
-#define NS_GET_NSTYPE _IO(0xb7, 0x3)
-#endif
-
-#ifndef NS_GET_OWNER_UID /* d95fa3c76a66b6d76b1e109ea505c55e66360f3c (4.11) */
-#define NS_GET_OWNER_UID _IO(0xb7, 0x4)
-#endif
-
 #ifndef FS_PROJINHERIT_FL
 #  define FS_PROJINHERIT_FL 0x20000000
 #else
 assert_cc(FS_PROJINHERIT_FL == 0x20000000);
 #endif
 
+/* Not exposed yet. Defined at fs/ext4/ext4.h */
+#ifndef EXT4_IOC_RESIZE_FS
+#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
+#endif
+
 /* linux/fscrypt.h */
 #ifndef FS_KEY_DESCRIPTOR_SIZE
 #  define FS_KEY_DESCRIPTOR_SIZE 8
index 318c0143b8d974663496da2ebcd474221fff9f2d..1c7285151e9ff5072179b334b15ef34c4a2b76a8 100644 (file)
@@ -1,6 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <linux/types.h>
+
 /* Root namespace inode numbers, as per include/linux/proc_ns.h in the kernel source tree, since v3.8:
  * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=98f842e675f96ffac96e6c50315790912b2812be */
 
 #define PROC_PID_INIT_INO    ((ino_t) UINT32_C(0xEFFFFFFC))
 #define PROC_CGROUP_INIT_INO ((ino_t) UINT32_C(0xEFFFFFFB))
 #define PROC_TIME_INIT_INO   ((ino_t) UINT32_C(0xEFFFFFFA))
+
+/* linux/nsfs.h */
+#ifndef NS_GET_USERNS /* 6786741dbf99e44fb0c0ed85a37582b8a26f1c3b (4.9) */
+#define NS_GET_USERNS _IO(0xb7, 0x1)
+#endif
+
+#ifndef NS_GET_NSTYPE /* e5ff5ce6e20ee22511398bb31fb912466cf82a36 (4.11) */
+#define NS_GET_NSTYPE _IO(0xb7, 0x3)
+#endif
+
+#ifndef NS_GET_OWNER_UID /* d95fa3c76a66b6d76b1e109ea505c55e66360f3c (4.11) */
+#define NS_GET_OWNER_UID _IO(0xb7, 0x4)
+#endif