summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/truss/syscall.h')
-rw-r--r--usr.bin/truss/syscall.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h
index b74eded..a240749 100644
--- a/usr.bin/truss/syscall.h
+++ b/usr.bin/truss/syscall.h
@@ -10,6 +10,7 @@
* BinString -- pointer to an array of chars, printed via strvisx().
* Ptr -- pointer to some unspecified structure. Just print as hex for now.
* Stat -- a pointer to a stat buffer. Prints a couple fields.
+ * StatFs -- a pointer to a statfs buffer. Prints a few fields.
* Ioctl -- an ioctl command. Woefully limited.
* Quad -- a double-word value. e.g., lseek(int, offset_t, int)
* Signal -- a signal number. Prints the signal name (SIGxxx)
@@ -39,10 +40,11 @@
enum Argtype { None = 1, Hex, Octal, Int, LongHex, Name, Ptr, Stat, Ioctl, Quad,
Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, Pollfd,
Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres,
- Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open,
+ Umtx, Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open,
Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2,
Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl,
- LinuxSockArgs, Umtxop };
+ LinuxSockArgs, Umtxop, Atfd, Atflags, Accessmode, Long,
+ Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex };
#define ARG_MASK 0xff
#define OUT 0x100
@@ -54,9 +56,10 @@ struct syscall_args {
};
struct syscall {
+ STAILQ_ENTRY(syscall) entries;
const char *name;
- int ret_type; /* 0, 1, or 2 return values */
- int nargs; /* actual number of meaningful arguments */
+ u_int ret_type; /* 0, 1, or 2 return values */
+ u_int nargs; /* actual number of meaningful arguments */
/* Hopefully, no syscalls with > 10 args */
struct syscall_args args[10];
struct timespec time; /* Time spent for this call */
@@ -64,8 +67,8 @@ struct syscall {
int nerror; /* Number of calls that returned with error */
};
-struct syscall *get_syscall(const char*);
-char *print_arg(struct syscall_args *, unsigned long*, long, struct trussinfo *);
+struct syscall *get_syscall(const char *, int nargs);
+char *print_arg(struct syscall_args *, unsigned long*, long *, struct trussinfo *);
/*
* Linux Socket defines
@@ -86,11 +89,11 @@ char *print_arg(struct syscall_args *, unsigned long*, long, struct trussinfo *)
#define LINUX_SETSOCKOPT 14
#define LINUX_GETSOCKOPT 15
#define LINUX_SENDMSG 16
-#define LINUX_RECVMSG 17
+#define LINUX_RECVMSG 17
#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \
0 : sizeof(register_t) - sizeof(t))
-
+
#if BYTE_ORDER == LITTLE_ENDIAN
#define PADL_(t) 0
#define PADR_(t) PAD_(t)
@@ -107,7 +110,8 @@ struct linux_socketcall_args {
char args_l_[PADL_(l_ulong)]; l_ulong args; char args_r_[PADR_(l_ulong)];
};
+void init_syscalls(void);
void print_syscall(struct trussinfo *, const char *, int, char **);
void print_syscall_ret(struct trussinfo *, const char *, int, char **, int,
- long, struct syscall *);
+ long *, struct syscall *);
void print_summary(struct trussinfo *trussinfo);
OpenPOWER on IntegriCloud