History

tools: update nsfs.h uapi header

Update the nsfs.h tools header to the uapi/nsfs.h header so we can rely on it in the selftests.

Christian Brauner committed 1 year ago

Commit 87a17161 parent f8612251 file · +15 −2Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/nsfs.h+15−2
@@ -16,8 +16,6 @@ · 15 unmodified lines
1616 #define NS_GET_NSTYPE _IO(NSIO, 0x3)
1717 /* Get owner UID (in the caller's user namespace) for a user namespace */
1818 #define NS_GET_OWNER_UID _IO(NSIO, 0x4)
19−/* Get the id for a mount namespace */
20−#define NS_GET_MNTNS_ID _IOR(NSIO, 0x5, __u64)
2119 /* Translate pid from target pid namespace into the caller's pid namespace. */
2220 #define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int)
2321 /* Return thread-group leader id of pid in the callers pid namespace. */
@@ -42,4 +40,19 @@ struct mnt_ns_info { · 18 unmodified lines
4240 /* Get previous namespace. */
4341 #define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
4442
43+/* Retrieve namespace identifiers. */
44+#define NS_GET_MNTNS_ID _IOR(NSIO, 5, __u64)
45+#define NS_GET_ID _IOR(NSIO, 13, __u64)
46+
47+enum init_ns_ino {
48+ IPC_NS_INIT_INO = 0xEFFFFFFFU,
49+ UTS_NS_INIT_INO = 0xEFFFFFFEU,
50+ USER_NS_INIT_INO = 0xEFFFFFFDU,
51+ PID_NS_INIT_INO = 0xEFFFFFFCU,
52+ CGROUP_NS_INIT_INO = 0xEFFFFFFBU,
53+ TIME_NS_INIT_INO = 0xEFFFFFFAU,
54+ NET_NS_INIT_INO = 0xEFFFFFF9U,
55+ MNT_NS_INIT_INO = 0xEFFFFFF8U,
56+};
57+
4558 #endif /* __LINUX_NSFS_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t