Include "kernel_types.h" in defs.h and tests/tests.h
As kernel_ulong_t type is going to be used in the definition of struct tcb and in many function prototypes, make it readily available for every source file by including "kernel_types.h" in defs.h and tests/tests.h files. * defs.h: Include "kernel_types.h". * tests/tests.h: Likewise. * desc.c: Do not include "kernel_types.h". * dirent.c: Likewise. * keyctl.c: Likewise. * syscall.c: Likewise. * linux/asm_stat.h: Likewise. * tests/answer.c: Likewise. * tests/epoll_pwait.c: Likewise. * tests/fanotify_init.c: Likewise. * tests/fanotify_mark.c: Likewise. * tests/file_handle.c: Likewise. * tests/ftruncate.c: Likewise. * tests/getdents.c: Likewise. * tests/init_delete_module.h: Likewise. * tests/inotify.c: Likewise. * tests/inotify_init1.c: Likewise. * tests/ioprio.c: Likewise. * tests/ipc_msgbuf.c: Likewise. * tests/kcmp.c: Likewise. * tests/kexec_file_load.c: Likewise. * tests/kexec_load.c: Likewise. * tests/keyctl.c: Likewise. * tests/lookup_dcookie.c: Likewise. * tests/lseek.c: Likewise. * tests/mq_sendrecv.c: Likewise. * tests/nsyscalls.c: Likewise. * tests/pkey_alloc.c: Likewise. * tests/pkey_free.c: Likewise. * tests/pkey_mprotect.c: Likewise. * tests/prctl-pdeathsig.c: Likewise. * tests/prctl-tsc.c: Likewise. * tests/preadv2-pwritev2.c: Likewise. * tests/process_vm_readv_writev.c: Likewise. * tests/read-write.c: Likewise. * tests/setfsugid.c: Likewise. * tests/setns.c: Likewise. * tests/truncate.c: Likewise. * tests/unshare.c: Likewise. * tests/xgetrlimit.c: Likewise.
This commit is contained in:
parent
2fc39d0a4c
commit
f55ef46feb
1
defs.h
1
defs.h
@ -53,6 +53,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#include "kernel_types.h"
|
||||
#include "mpers_type.h"
|
||||
#include "gcc_compat.h"
|
||||
|
||||
|
2
desc.c
2
desc.c
@ -226,8 +226,6 @@ SYS_FUNC(select)
|
||||
return decode_select(tcp, tcp->u_arg, print_timeval, sprint_timeval);
|
||||
}
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
static int
|
||||
umove_kulong_array_or_printaddr(struct tcb *tcp, const long addr,
|
||||
kernel_ulong_t *ptr, size_t n)
|
||||
|
2
dirent.c
2
dirent.c
@ -33,8 +33,6 @@
|
||||
|
||||
#include DEF_MPERS_TYPE(kernel_dirent)
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#define D_NAME_LEN_MAX 256
|
||||
|
1
keyctl.c
1
keyctl.c
@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "kernel_types.h"
|
||||
|
||||
typedef int32_t key_serial_t;
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef STRACE_ASM_STAT_H
|
||||
#define STRACE_ASM_STAT_H
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
# undef dev_t
|
||||
# undef gid_t
|
||||
# undef ino_t
|
||||
|
@ -1003,8 +1003,6 @@ restore_cleared_syserror(struct tcb *tcp)
|
||||
tcp->u_error = saved_u_error;
|
||||
}
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
/*
|
||||
* Check the syscall return value register value for whether it is
|
||||
* a negated errno code indicating an error, or a success return value.
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "tests.h"
|
||||
#include <unistd.h>
|
||||
#include <asm/unistd.h>
|
||||
#include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
|
@ -8,8 +8,6 @@
|
||||
# include <sys/epoll.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -37,8 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
/* Performs fanotify_init call via the syscall interface. */
|
||||
static void
|
||||
do_call(kernel_ulong_t flags, const char *flags_str,
|
||||
|
@ -38,11 +38,8 @@
|
||||
# include <limits.h>
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include <sys/fanotify.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
/* Performs fanotify_mark call via the syscall interface. */
|
||||
static void
|
||||
do_call(kernel_ulong_t fd, kernel_ulong_t flags, const char *flags_str,
|
||||
|
@ -41,8 +41,6 @@
|
||||
# include <stdbool.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
enum assert_rc {
|
||||
ASSERT_NONE,
|
||||
ASSERT_SUCCESS,
|
||||
|
@ -33,8 +33,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -37,7 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <sys/stat.h>
|
||||
# include <unistd.h>
|
||||
# include "kernel_types.h"
|
||||
|
||||
static const char fname[] =
|
||||
"A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n"
|
||||
|
@ -34,9 +34,6 @@
|
||||
# include <stdbool.h>
|
||||
# include <stdio.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
|
||||
enum {
|
||||
PARAM1_LEN = 33,
|
||||
PARAM2_LEN = 8,
|
||||
|
@ -37,8 +37,6 @@
|
||||
# include <string.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -37,8 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
# ifdef O_CLOEXEC
|
||||
# define cloexec_flag O_CLOEXEC
|
||||
# else
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
enum {
|
||||
IOPRIO_CLASS_NONE,
|
||||
IOPRIO_CLASS_RT,
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/stat.h>
|
||||
#include "kernel_types.h"
|
||||
|
||||
#define text_string "STRACE_STRING"
|
||||
#define msgsz sizeof(text_string)
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
# define KCMP_FILE 0
|
||||
# define KCMP_SYSVSEM 6
|
||||
|
||||
|
@ -37,8 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
struct strval {
|
||||
kernel_ulong_t val;
|
||||
const char *str64;
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
struct strval {
|
||||
kernel_ulong_t val;
|
||||
const char *str64;
|
||||
|
@ -44,11 +44,8 @@
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include <sys/uio.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
/* This check should be before #include "xlat/keyctl_commands.h" */
|
||||
# ifndef KEYCTL_DH_COMPUTE
|
||||
struct keyctl_dh_params {
|
||||
|
@ -38,9 +38,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
|
||||
static void
|
||||
do_lookup_cookie(uint64_t cookie, char *buf, kernel_ulong_t len)
|
||||
{
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
|
@ -47,7 +47,6 @@
|
||||
# include <time.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
# include "sigevent.h"
|
||||
|
||||
# ifndef MQ_NAME
|
||||
|
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "kernel_types.h"
|
||||
#include "syscall.h"
|
||||
|
||||
#define TD 0
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -38,8 +38,6 @@
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
const char *
|
||||
sprintptr(kernel_ulong_t ptr)
|
||||
{
|
||||
|
@ -38,8 +38,6 @@
|
||||
# include <unistd.h>
|
||||
# include <sys/signal.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -37,8 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -37,7 +37,6 @@
|
||||
# include <stdio.h>
|
||||
# include <sys/uio.h>
|
||||
# include <unistd.h>
|
||||
# include "kernel_types.h"
|
||||
|
||||
static int
|
||||
pr(const int fd, const struct iovec *const vec,
|
||||
|
@ -30,11 +30,8 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
#if OP_WR
|
||||
# define in_iovec rmt_iovec
|
||||
# define out_iovec lcl_iovec
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <asm/unistd.h>
|
||||
#include "kernel_types.h"
|
||||
|
||||
static void
|
||||
dump_str(const char *str, const unsigned int len)
|
||||
|
@ -30,8 +30,6 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
void
|
||||
printuid(unsigned UGID_TYPE id)
|
||||
{
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@
|
||||
# endif
|
||||
|
||||
# include <sys/types.h>
|
||||
# include "kernel_types.h"
|
||||
# include "gcc_compat.h"
|
||||
|
||||
/* Tests of "strace -v" are expected to define VERBOSE to 1. */
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
|
@ -36,8 +36,6 @@
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# include "kernel_types.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "kernel_types.h"
|
||||
#include "xlat.h"
|
||||
#include "xlat/resources.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user