]> granicus.if.org Git - strace/commitdiff
Move definition of struct sysent and trace flags to a separate file
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 30 Dec 2016 09:40:37 +0000 (09:40 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 30 Dec 2016 09:45:10 +0000 (09:45 +0000)
* sysent.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h: Include it.
(struct sysent, TRACE_FILE, TRACE_IPC, TRACE_NETWORK, TRACE_PROCESS,
TRACE_SIGNAL, TRACE_DESC, TRACE_MEMORY, SYSCALL_NEVER_FAILS,
STACKTRACE_INVALIDATE_CACHE, STACKTRACE_CAPTURE_ON_ENTER,
TRACE_INDIRECT_SUBCALL, COMPAT_SYSCALL_TYPES): Remove.

Makefile.am
defs.h
sysent.h [new file with mode: 0644]

index 2b01d3dc472dcb604332ec7862e8d889ad934e75..0e157dbc0fb3264050ef5b8afaef2106549579ec 100644 (file)
@@ -232,6 +232,7 @@ strace_SOURCES =    \
        swapon.c        \
        syscall.c       \
        sysctl.c        \
+       sysent.h        \
        sysinfo.c       \
        syslog.c        \
        sysmips.c       \
diff --git a/defs.h b/defs.h
index 7582a9e59f8ce27c2f27d17ca3aa4869a62a3043..83d28f04c55c3e94eb4d38a83a0c6936373c2eda 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -56,6 +56,7 @@
 #include "kernel_types.h"
 #include "mpers_type.h"
 #include "gcc_compat.h"
+#include "sysent.h"
 
 #ifndef HAVE_STRERROR
 const char *strerror(int);
@@ -201,14 +202,6 @@ extern char *stpcpy(char *dst, const char *src);
 # define PERSONALITY2_INCLUDE_FUNCS "empty.h"
 #endif
 
-typedef struct sysent {
-       unsigned nargs;
-       int     sys_flags;
-       int     sen;
-       int     (*sys_func)();
-       const char *sys_name;
-} struct_sysent;
-
 typedef struct ioctlent {
        const char *symbol;
        unsigned int code;
@@ -328,19 +321,6 @@ extern const struct xlat whence_codes[];
 
 #define RVAL_DECODED   0100    /* syscall decoding finished */
 
-#define TRACE_FILE     001     /* Trace file-related syscalls. */
-#define TRACE_IPC      002     /* Trace IPC-related syscalls. */
-#define TRACE_NETWORK  004     /* Trace network-related syscalls. */
-#define TRACE_PROCESS  010     /* Trace process-related syscalls. */
-#define TRACE_SIGNAL   020     /* Trace signal-related syscalls. */
-#define TRACE_DESC     040     /* Trace file descriptor-related syscalls. */
-#define TRACE_MEMORY   0100    /* Trace memory mapping-related syscalls. */
-#define SYSCALL_NEVER_FAILS    0200    /* Syscall is always successful. */
-#define STACKTRACE_INVALIDATE_CACHE 0400  /* Trigger proc/maps cache updating */
-#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */
-#define TRACE_INDIRECT_SUBCALL 02000   /* Syscall is an indirect socket/ipc subcall. */
-#define COMPAT_SYSCALL_TYPES   04000   /* A compat syscall that uses compat types. */
-
 #define IOCTL_NUMBER_UNKNOWN 0
 #define IOCTL_NUMBER_HANDLED 1
 #define IOCTL_NUMBER_STOP_LOOKUP 010
diff --git a/sysent.h b/sysent.h
new file mode 100644 (file)
index 0000000..aa93bcb
--- /dev/null
+++ b/sysent.h
@@ -0,0 +1,25 @@
+#ifndef STRACE_SYSENT_H
+#define STRACE_SYSENT_H
+
+typedef struct sysent {
+       unsigned nargs;
+       int     sys_flags;
+       int     sen;
+       int     (*sys_func)();
+       const char *sys_name;
+} struct_sysent;
+
+#define TRACE_FILE             001     /* Trace file-related syscalls. */
+#define TRACE_IPC              002     /* Trace IPC-related syscalls. */
+#define TRACE_NETWORK          004     /* Trace network-related syscalls. */
+#define TRACE_PROCESS          010     /* Trace process-related syscalls. */
+#define TRACE_SIGNAL           020     /* Trace signal-related syscalls. */
+#define TRACE_DESC             040     /* Trace file descriptor-related syscalls. */
+#define TRACE_MEMORY           0100    /* Trace memory mapping-related syscalls. */
+#define SYSCALL_NEVER_FAILS    0200    /* Syscall is always successful. */
+#define STACKTRACE_INVALIDATE_CACHE 0400  /* Trigger proc/maps cache updating */
+#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */
+#define TRACE_INDIRECT_SUBCALL 02000   /* Syscall is an indirect socket/ipc subcall. */
+#define COMPAT_SYSCALL_TYPES   04000   /* A compat syscall that uses compat types. */
+
+#endif /* !STRACE_SYSENT_H */