mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 08:12:20 +00:00
syscalls: add fsopen()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
8bdacc22a4
commit
49b21cd7d9
@ -622,7 +622,7 @@ AC_CHECK_HEADER([ifaddrs.h],
|
||||
AC_HEADER_MAJOR
|
||||
|
||||
# Check for some syscalls functions
|
||||
AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3])
|
||||
AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen])
|
||||
AC_CHECK_TYPES([struct clone_args], [], [], [[#include <linux/sched.h>]])
|
||||
AC_CHECK_MEMBERS([struct clone_args.set_tid],[],[],[[#include <linux/sched.h>]])
|
||||
AC_CHECK_MEMBERS([struct clone_args.cgroup],[],[],[[#include <linux/sched.h>]])
|
||||
|
@ -563,4 +563,24 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __NR_fsopen
|
||||
#if defined __alpha__
|
||||
#define __NR_fsopen 540
|
||||
#elif defined _MIPS_SIM
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
|
||||
#define __NR_fsopen 4430
|
||||
#endif
|
||||
#if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
|
||||
#define __NR_fsopen 6430
|
||||
#endif
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
|
||||
#define __NR_fsopen 5430
|
||||
#endif
|
||||
#elif defined __ia64__
|
||||
#define __NR_fsopen (430 + 1024)
|
||||
#else
|
||||
#define __NR_fsopen 430
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __LXC_SYSCALL_NUMBERS_H */
|
||||
|
@ -161,4 +161,14 @@ static inline int open_tree_lxc(int dfd, const char *filename, unsigned int flag
|
||||
extern int open_tree(int dfd, const char *filename, unsigned int flags);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FSOPEN
|
||||
static inline int fsopen_lxc(const char *fs_name, unsigned int flags)
|
||||
{
|
||||
return syscall(__NR_fsopen, fs_name, flags);
|
||||
}
|
||||
#define fsopen fsopen_lxc
|
||||
#else
|
||||
extern int fsopen(const char *fs_name, unsigned int flags);
|
||||
#endif
|
||||
|
||||
#endif /* __LXC_SYSCALL_WRAPPER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user