for (arg_ptr_addr = arg2; ; arg_ptr_addr += sizeof(abi_ulong)) {
abi_ulong *arg_ptr, arg_addr;
- arg_ptr = lock_user(VERIFY_READ, arg_ptr_addr, sizeof(abi_ulong), 1);
+ arg_ptr = lock_user(VERIFY_READ, arg_ptr_addr, sizeof(abi_ulong), 1);
if (!arg_ptr)
return;
arg_addr = tswapal(*arg_ptr);
- unlock_user(arg_ptr, arg_ptr_addr, 0);
+ unlock_user(arg_ptr, arg_ptr_addr, 0);
if (!arg_addr)
break;
if ((s = lock_user_string(arg_addr))) {
#endif
#ifdef O_PATH
FLAG_TARGET(O_PATH),
+#endif
+#ifdef O_TMPFILE
+ FLAG_TARGET(O_TMPFILE),
+ FLAG_TARGET(__O_TMPFILE),
#endif
FLAG_END,
};
FLAG_END,
};
+UNUSED static struct flags statx_flags[] = {
+#ifdef AT_EMPTY_PATH
+ FLAG_GENERIC(AT_EMPTY_PATH),
+#endif
+#ifdef AT_NO_AUTOMOUNT
+ FLAG_GENERIC(AT_NO_AUTOMOUNT),
+#endif
+#ifdef AT_SYMLINK_NOFOLLOW
+ FLAG_GENERIC(AT_SYMLINK_NOFOLLOW),
+#endif
+#ifdef AT_STATX_SYNC_AS_STAT
+ FLAG_GENERIC(AT_STATX_SYNC_AS_STAT),
+#endif
+#ifdef AT_STATX_FORCE_SYNC
+ FLAG_GENERIC(AT_STATX_FORCE_SYNC),
+#endif
+#ifdef AT_STATX_DONT_SYNC
+ FLAG_GENERIC(AT_STATX_DONT_SYNC),
+#endif
+ FLAG_END,
+};
+
+UNUSED static struct flags statx_mask[] = {
+/* This must come first, because it includes everything. */
+#ifdef STATX_ALL
+ FLAG_GENERIC(STATX_ALL),
+#endif
+/* This must come second; it includes everything except STATX_BTIME. */
+#ifdef STATX_BASIC_STATS
+ FLAG_GENERIC(STATX_BASIC_STATS),
+#endif
+#ifdef STATX_TYPE
+ FLAG_GENERIC(STATX_TYPE),
+#endif
+#ifdef STATX_MODE
+ FLAG_GENERIC(STATX_MODE),
+#endif
+#ifdef STATX_NLINK
+ FLAG_GENERIC(STATX_NLINK),
+#endif
+#ifdef STATX_UID
+ FLAG_GENERIC(STATX_UID),
+#endif
+#ifdef STATX_GID
+ FLAG_GENERIC(STATX_GID),
+#endif
+#ifdef STATX_ATIME
+ FLAG_GENERIC(STATX_ATIME),
+#endif
+#ifdef STATX_MTIME
+ FLAG_GENERIC(STATX_MTIME),
+#endif
+#ifdef STATX_CTIME
+ FLAG_GENERIC(STATX_CTIME),
+#endif
+#ifdef STATX_INO
+ FLAG_GENERIC(STATX_INO),
+#endif
+#ifdef STATX_SIZE
+ FLAG_GENERIC(STATX_SIZE),
+#endif
+#ifdef STATX_BLOCKS
+ FLAG_GENERIC(STATX_BLOCKS),
+#endif
+#ifdef STATX_BTIME
+ FLAG_GENERIC(STATX_BTIME),
+#endif
+ FLAG_END,
+};
+
/*
* print_xxx utility functions. These are used to print syscall
* parameters in certain format. All of these have parameter
}
#endif
+#ifdef TARGET_NR_chroot
+static void
+print_chroot(const struct syscallname *name,
+ abi_long arg0, abi_long arg1, abi_long arg2,
+ abi_long arg3, abi_long arg4, abi_long arg5)
+{
+ print_syscall_prologue(name);
+ print_string(arg0, 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
#ifdef TARGET_NR_chmod
static void
print_chmod(const struct syscallname *name,
case TARGET_SO_REUSEADDR:
gemu_log("SO_REUSEADDR,");
goto print_optint;
+ case TARGET_SO_REUSEPORT:
+ gemu_log("SO_REUSEPORT,");
+ goto print_optint;
case TARGET_SO_TYPE:
gemu_log("SO_TYPE,");
goto print_optint;
print_pointer(arg1, 1);
print_syscall_epilogue(name);
}
-#define print_statfs64 print_statfs
+#endif
+
+#ifdef TARGET_NR_statfs64
+static void
+print_statfs64(const struct syscallname *name,
+ abi_long arg0, abi_long arg1, abi_long arg2,
+ abi_long arg3, abi_long arg4, abi_long arg5)
+{
+ print_syscall_prologue(name);
+ print_string(arg0, 0);
+ print_pointer(arg1, 1);
+ print_syscall_epilogue(name);
+}
#endif
#ifdef TARGET_NR_symlink
}
#endif
+#ifdef TARGET_NR_statx
+static void
+print_statx(const struct syscallname *name,
+ abi_long arg0, abi_long arg1, abi_long arg2,
+ abi_long arg3, abi_long arg4, abi_long arg5)
+{
+ print_syscall_prologue(name);
+ print_at_dirfd(arg0, 0);
+ print_string(arg1, 0);
+ print_flags(statx_flags, arg2, 0);
+ print_flags(statx_mask, arg3, 0);
+ print_pointer(arg4, 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
/*
* An array of all of the syscalls we know about
*/