ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-Clone/Clone.xs
(Generate patch)

Comparing Linux-Clone/Clone.xs (file contents):
Revision 1.6 by root, Sat Sep 3 23:47:02 2022 UTC vs.
Revision 1.9 by root, Tue Sep 6 10:57:01 2022 UTC

13 13
14#include <sched.h> 14#include <sched.h>
15 15
16#include <sys/ioctl.h> 16#include <sys/ioctl.h>
17#include <net/if.h> 17#include <net/if.h>
18
19#include <linux/nsfs.h>
20#include <linux/kcmp.h>
21
22/* kcmp.h does not define symbols, so there is no way to detect preesence of enum */
23/* members, so we just hardcode new symbols here. */
24#ifndef KCMP_EPOLL_TFD
25 #define KCMP_EPOLL_TFD 7
26#endif
18 27
19#ifdef __has_include 28#ifdef __has_include
20 #if !__has_include("linux/kcmp.h") // use "" as GCC wrongly expands macros 29 #if !__has_include("linux/kcmp.h") // use "" as GCC wrongly expands macros
21 #undef SYS_kcmp 30 #undef SYS_kcmp
22 #endif 31 #endif
114 const_iv_clone (NEWIPC) 123 const_iv_clone (NEWIPC)
115# endif 124# endif
116# ifdef CLONE_NEWNET 125# ifdef CLONE_NEWNET
117 const_iv_clone (NEWNET) 126 const_iv_clone (NEWNET)
118# endif 127# endif
128# ifdef CLONE_NEWTIME
129 x
130 const_iv_clone (NEWTIME)
131# endif
119# ifdef CLONE_PTRACE 132# ifdef CLONE_PTRACE
120 const_iv_clone (PTRACE) 133 const_iv_clone (PTRACE)
121# endif 134# endif
122# ifdef CLONE_VFORK 135# ifdef CLONE_VFORK
123 const_iv_clone (VFORK) 136 const_iv_clone (VFORK)
161 const_iv (KCMP_FILES) 174 const_iv (KCMP_FILES)
162 const_iv (KCMP_FS) 175 const_iv (KCMP_FS)
163 const_iv (KCMP_SIGHAND) 176 const_iv (KCMP_SIGHAND)
164 const_iv (KCMP_IO) 177 const_iv (KCMP_IO)
165 const_iv (KCMP_SYSVSEM) 178 const_iv (KCMP_SYSVSEM)
166 const_iv (KCMP_FILE) 179 const_iv (KCMP_EPOLL_TFD)
180# endif
181# ifdef NS_GET_USERNS
182 const_iv (NS_GET_USERNS)
183# endif
184# ifdef NS_GET_PARENT
185 const_iv (NS_GET_PARENT)
186# endif
187# ifdef NS_GET_NSTYPE
188 const_iv (NS_GET_NSTYPE)
189# endif
190# ifdef NS_OWNER_UID
191 const_iv (NS_OWNER_UID
167# endif 192# endif
168 }; 193 };
169 194
170 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) 195 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
171 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 196 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
203} 228}
204 OUTPUT: RETVAL 229 OUTPUT: RETVAL
205 230
206int 231int
207unshare (int flags) 232unshare (int flags)
233 PROTOTYPE: @
208 234
209int 235int
210setns (SV *fh_or_fd, int nstype = 0) 236setns (SV *fh_or_fd, int nstype = 0)
211 C_ARGS: s_fileno (fh_or_fd, 0), nstype 237 C_ARGS: s_fileno (fh_or_fd, 0), nstype
212 238

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines