diff options
author | des <des@FreeBSD.org> | 2011-10-21 11:08:25 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2011-10-21 11:08:25 +0000 |
commit | 6c6abb3ddc0d7b2572a91949e5eaf448f0a392af (patch) | |
tree | 762720b203c8a69ddb88af3b29c52f2a2c9d5302 /usr.bin/truss | |
parent | 28e8dea25892d12660b01d59590e5a8e70ae3880 (diff) | |
download | FreeBSD-src-6c6abb3ddc0d7b2572a91949e5eaf448f0a392af.zip FreeBSD-src-6c6abb3ddc0d7b2572a91949e5eaf448f0a392af.tar.gz |
It turns out that truss also used kdump's mkioctls script, and expected
ioctlname() to return a pointer to the name rather than print it. This did
not show up in testing because truss had its own prototype for ioctlname(),
so it would build fine and run fine as long as the program being traced did
not issue an ioctl.
Teach mkioctls to generate different versions of ioctlname() based on its
first command-line argument.
Pointed out by: Garrett Cooper <yanegomi@gmail.com>
Diffstat (limited to 'usr.bin/truss')
-rw-r--r-- | usr.bin/truss/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/truss/extern.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index f80ac03..31f08d4 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -23,7 +23,8 @@ syscalls.h: syscalls.master ${.CURDIR}/i386.conf ioctl.c: ${.CURDIR}/../kdump/mkioctls - sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET} + env MACHINE=${MACHINE} \ + /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}/usr/include > ${.TARGET} .if ${MACHINE_CPUARCH} == "i386" SRCS+= i386-linux.c linux_syscalls.h diff --git a/usr.bin/truss/extern.h b/usr.bin/truss/extern.h index e3ffc4f..a56a01e 100644 --- a/usr.bin/truss/extern.h +++ b/usr.bin/truss/extern.h @@ -35,7 +35,7 @@ extern int setup_and_wait(char **); extern int start_tracing(int); extern void restore_proc(int); extern void waitevent(struct trussinfo *); -extern const char *ioctlname(register_t val); +extern const char *ioctlname(unsigned long val); extern char *strsig(int sig); #ifdef __amd64__ extern void amd64_syscall_entry(struct trussinfo *, int); |