From: Dmitry V. Levin Date: Thu, 2 Jul 2015 22:31:11 +0000 (+0000) Subject: ioctl: prepare ioctl_decode_command_number for future changes X-Git-Tag: v4.11~486 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f63c113887a738a06e4bd35c7f867e975793f91;p=strace ioctl: prepare ioctl_decode_command_number for future changes * ioctl.c (ioctl_decode_command_number): Change 1st arg to struct tcb*. (sys_ioctl): Update callers. --- diff --git a/ioctl.c b/ioctl.c index 305d27d3..d10e45d2 100644 --- a/ioctl.c +++ b/ioctl.c @@ -182,8 +182,10 @@ hiddev_decode_number(const unsigned int code) } static int -ioctl_decode_command_number(const unsigned int code) +ioctl_decode_command_number(struct tcb *tcp) { + const unsigned int code = tcp->u_arg[1]; + switch (_IOC_TYPE(code)) { case 'E': return evdev_decode_number(code); @@ -274,7 +276,7 @@ SYS_FUNC(ioctl) if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - if (!ioctl_decode_command_number(tcp->u_arg[1])) { + if (!ioctl_decode_command_number(tcp)) { iop = ioctl_lookup(tcp->u_arg[1]); if (iop) { tprints(iop->symbol);