|
15 | 15 |
|
16 | 16 | #include "pidfd.h"
|
17 | 17 | #include "../kselftest_harness.h"
|
18 |
| - |
19 |
| -#ifndef __NR_open_tree |
20 |
| - #if defined __alpha__ |
21 |
| - #define __NR_open_tree 538 |
22 |
| - #elif defined _MIPS_SIM |
23 |
| - #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ |
24 |
| - #define __NR_open_tree 4428 |
25 |
| - #endif |
26 |
| - #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ |
27 |
| - #define __NR_open_tree 6428 |
28 |
| - #endif |
29 |
| - #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ |
30 |
| - #define __NR_open_tree 5428 |
31 |
| - #endif |
32 |
| - #elif defined __ia64__ |
33 |
| - #define __NR_open_tree (428 + 1024) |
34 |
| - #else |
35 |
| - #define __NR_open_tree 428 |
36 |
| - #endif |
37 |
| -#endif |
38 |
| - |
39 |
| -#ifndef __NR_move_mount |
40 |
| - #if defined __alpha__ |
41 |
| - #define __NR_move_mount 539 |
42 |
| - #elif defined _MIPS_SIM |
43 |
| - #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ |
44 |
| - #define __NR_move_mount 4429 |
45 |
| - #endif |
46 |
| - #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ |
47 |
| - #define __NR_move_mount 6429 |
48 |
| - #endif |
49 |
| - #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ |
50 |
| - #define __NR_move_mount 5429 |
51 |
| - #endif |
52 |
| - #elif defined __ia64__ |
53 |
| - #define __NR_move_mount (428 + 1024) |
54 |
| - #else |
55 |
| - #define __NR_move_mount 429 |
56 |
| - #endif |
57 |
| -#endif |
58 |
| - |
59 |
| -#ifndef MOVE_MOUNT_F_EMPTY_PATH |
60 |
| -#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */ |
61 |
| -#endif |
62 |
| - |
63 |
| -#ifndef MOVE_MOUNT_F_EMPTY_PATH |
64 |
| -#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */ |
65 |
| -#endif |
66 |
| - |
67 |
| -static inline int sys_move_mount(int from_dfd, const char *from_pathname, |
68 |
| - int to_dfd, const char *to_pathname, |
69 |
| - unsigned int flags) |
70 |
| -{ |
71 |
| - return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd, |
72 |
| - to_pathname, flags); |
73 |
| -} |
74 |
| - |
75 |
| -#ifndef OPEN_TREE_CLONE |
76 |
| -#define OPEN_TREE_CLONE 1 |
77 |
| -#endif |
78 |
| - |
79 |
| -#ifndef OPEN_TREE_CLOEXEC |
80 |
| -#define OPEN_TREE_CLOEXEC O_CLOEXEC |
81 |
| -#endif |
82 |
| - |
83 |
| -#ifndef AT_RECURSIVE |
84 |
| -#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */ |
85 |
| -#endif |
86 |
| - |
87 |
| -static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) |
88 |
| -{ |
89 |
| - return syscall(__NR_open_tree, dfd, filename, flags); |
90 |
| -} |
| 18 | +#include "../filesystems/wrappers.h" |
91 | 19 |
|
92 | 20 | FIXTURE(pidfd_bind_mount) {
|
93 | 21 | char template[PATH_MAX];
|
|
0 commit comments