From 4f63c113887a738a06e4bd35c7f867e975793f91 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 2 Jul 2015 22:31:11 +0000 Subject: [PATCH] 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. --- ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.40.0