diff options
author | John Baldwin <jhb@FreeBSD.org> | 2015-12-22 20:33:49 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2015-12-22 20:33:49 +0000 |
commit | 265e58989d94820a0845000733a5908bcf0d3b00 (patch) | |
tree | 12efcb04d4bc19b74d2554032b084f8fee602ddf /usr.bin/truss | |
parent | b63d070ad17e361cda7b769aac13ed87767f1958 (diff) | |
download | src-265e58989d94820a0845000733a5908bcf0d3b00.tar.gz src-265e58989d94820a0845000733a5908bcf0d3b00.zip |
Move the mkioctls script to libsysdecode and use it to generate a
sysdecode_ioctlname() function. This function matches the behavior
of the truss variant in that it returns a pointer to a string description
for known ioctls. The caller is responsible for displaying unknown
ioctl requests. For kdump this meant moving the logic to handle unknown
ioctl requests out of the generated function and into an ioctlname()
function in kdump.c instead.
Differential Revision: https://reviews.freebsd.org/D4610
Notes
Notes:
svn path=/head/; revision=292622
Diffstat (limited to 'usr.bin/truss')
-rw-r--r-- | usr.bin/truss/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/truss/syscalls.c | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index a300da17b398..a6e45243e180 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -2,16 +2,11 @@ NO_WERROR= PROG= truss -SRCS= cloudabi.c ioctl.c main.c setup.c syscalls.c +SRCS= cloudabi.c main.c setup.c syscalls.c LIBADD= sysdecode CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys -CLEANFILES= ioctl.c - -ioctl.c: ${.CURDIR}/../kdump/mkioctls - env MACHINE=${MACHINE} CPP="${CPP}" \ - /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}${INCLUDEDIR} > ${.TARGET} # Define where to generate syscalls for each ABI. ABI_SYSPATH.freebsd= sys/kern diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 990403e657a4..8ff57db6e595 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -1315,7 +1315,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval, unsigned long cmd; cmd = args[sc->offset]; - temp = ioctlname(cmd); + temp = sysdecode_ioctlname(cmd); if (temp) fputs(temp, fp); else { |