]> granicus.if.org Git - strace/commitdiff
Change type of ioctl 3rd argument from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:44 +0000 (11:32 +0000)
* defs.h (DECL_IOCTL): Change arg type from long to kernel_ureg_t.
* dm.c (dm_known_ioctl, dm_ioctl): Likewise.
* file_ioctl.c (file_ioctl): Likewise.
* fs_x_ioctl.c (fs_x_ioctl): Likewise.
* ioctl.c (ioctl_decode): Likewise.
* loop.c (decode_loop_info, decode_loop_info64): Change addr type
from long to kernel_ureg_t.
(loop_ioctl): Change arg type from long to kernel_ureg_t.
* ptp.c (ptp_ioctl): Likewise.
* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
print_sg_io_v4_res, scsi_ioctl): Likewise.
* sock.c (print_ifreq, sock_ioctl): Likewise.
(decode_ifconf): Change addr type from long to kernel_ureg_t.
* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
decode_modem_flags): Likewise.
(term_ioctl): Change arg type from long to kernel_ureg_t.
* ubi.c (ubi_ioctl): Likewise.
* userfaultfd.c (uffdio_ioctl): Likewise.

12 files changed:
defs.h
dm.c
file_ioctl.c
fs_x_ioctl.c
ioctl.c
loop.c
ptp.c
scsi.c
sock.c
term.c
ubi.c
userfaultfd.c

diff --git a/defs.h b/defs.h
index 59dc3028fbc2af66285884bfa9f50c248a14b711..f44a9fb79640d582158c999398165c776a640287 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -728,7 +728,7 @@ extern unsigned int qual_flags(const unsigned int);
 
 #define DECL_IOCTL(name)                                               \
 extern int                                                             \
-name ## _ioctl(struct tcb *, unsigned int request, long arg)
+name ## _ioctl(struct tcb *, unsigned int request, kernel_ureg_t arg)
 DECL_IOCTL(dm);
 DECL_IOCTL(file);
 DECL_IOCTL(fs_x);
diff --git a/dm.c b/dm.c
index 8f911e6d45a14b6a41b61f17d2d88a8ab1c191ea..c4d3c1405cfc4ab239f9a0a61ee5f61685517dd4 100644 (file)
--- a/dm.c
+++ b/dm.c
@@ -396,7 +396,8 @@ dm_ioctl_has_params(const unsigned int code)
 }
 
 static int
-dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
+dm_known_ioctl(struct tcb *const tcp, const unsigned int code,
+              const kernel_ureg_t arg)
 {
        struct dm_ioctl *ioc = NULL;
        struct dm_ioctl *entering_ioc = NULL;
@@ -516,7 +517,7 @@ dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
 }
 
 int
-dm_ioctl(struct tcb *tcp, const unsigned int code, long arg)
+dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg)
 {
        switch (code) {
        case DM_VERSION:
@@ -544,7 +545,7 @@ dm_ioctl(struct tcb *tcp, const unsigned int code, long arg)
 # else /* !(DM_VERSION_MAJOR == 4) */
 
 int
-dm_ioctl(struct tcb *tcp, const unsigned int code, long arg)
+dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg)
 {
        return 0;
 }
index de8101937b3058745a8dcfb35d80fb9eaf06e9c2..6f30a23d5808d5dbafdb180f9a1478af5ff891e4 100644 (file)
@@ -123,7 +123,8 @@ print_fiemap_extent(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat
 #endif /* HAVE_LINUX_FIEMAP_H */
 
 int
-file_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+file_ioctl(struct tcb *const tcp, const unsigned int code,
+          const kernel_ureg_t arg)
 {
        switch (code) {
        case FICLONE:   /* W */
index 7403e6b0d03e792a3c87fada135e41a7a352b269..619eaa91c3761160ffa382c197ebe60106507902 100644 (file)
@@ -30,7 +30,8 @@
 #include <linux/fs.h>
 
 int
-fs_x_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+fs_x_ioctl(struct tcb *const tcp, const unsigned int code,
+          const kernel_ureg_t arg)
 {
        switch (code) {
 #ifdef FITRIM
diff --git a/ioctl.c b/ioctl.c
index 126513fca67742e7340228d1e7df240c86c01235..5f6b45950ccb45b5a11c838b85e556da4ba95038 100644 (file)
--- a/ioctl.c
+++ b/ioctl.c
@@ -227,7 +227,7 @@ static int
 ioctl_decode(struct tcb *tcp)
 {
        const unsigned int code = tcp->u_arg[1];
-       const long arg = tcp->u_arg[2];
+       const kernel_ureg_t arg = tcp->u_arg[2];
 
        switch (_IOC_TYPE(code)) {
 #if defined(ALPHA) || defined(POWERPC)
diff --git a/loop.c b/loop.c
index 2de33c5fd6ffee5feeb6f4e7c6618a6a51f7d933..a9d7659a303f599cacab5621fdf892b0ea636233 100644 (file)
--- a/loop.c
+++ b/loop.c
@@ -33,7 +33,7 @@
 #include "xlat/loop_crypt_type_options.h"
 
 static void
-decode_loop_info(struct tcb *tcp, const long addr)
+decode_loop_info(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct loop_info info;
 
@@ -83,7 +83,7 @@ decode_loop_info(struct tcb *tcp, const long addr)
 }
 
 static void
-decode_loop_info64(struct tcb *tcp, const long addr)
+decode_loop_info64(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct loop_info64 info64;
 
@@ -140,7 +140,8 @@ decode_loop_info64(struct tcb *tcp, const long addr)
 }
 
 int
-loop_ioctl(struct tcb *tcp, const unsigned int code, long arg)
+loop_ioctl(struct tcb *const tcp, const unsigned int code,
+          const kernel_ureg_t arg)
 {
        if (!verbose(tcp))
                return RVAL_DECODED;
diff --git a/ptp.c b/ptp.c
index 69880e14e6778b18199204b23cfd30b05474f135..83e0b17b0491697bb9fcf166c60fa068145b1011 100644 (file)
--- a/ptp.c
+++ b/ptp.c
@@ -33,7 +33,8 @@
 #include "xlat/ptp_flags_options.h"
 
 int
-ptp_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+ptp_ioctl(struct tcb *const tcp, const unsigned int code,
+         const kernel_ureg_t arg)
 {
        if (!verbose(tcp))
                return RVAL_DECODED;
diff --git a/scsi.c b/scsi.c
index 482c5b8fd04d815c7c1afeb16ed11b511b5f46a6..db59323d9318280c4ffcd3b8becffef750f51b80 100644 (file)
--- a/scsi.c
+++ b/scsi.c
@@ -61,7 +61,7 @@ print_sg_io_buffer(struct tcb *const tcp, const kernel_ureg_t addr,
 }
 
 static int
-print_sg_io_v3_req(struct tcb *tcp, const long arg)
+print_sg_io_v3_req(struct tcb *const tcp, const kernel_ureg_t arg)
 {
        struct sg_io_hdr sg_io;
 
@@ -96,7 +96,7 @@ print_sg_io_v3_req(struct tcb *tcp, const long arg)
 }
 
 static void
-print_sg_io_v3_res(struct tcb *tcp, const long arg)
+print_sg_io_v3_res(struct tcb *const tcp, const kernel_ureg_t arg)
 {
        struct sg_io_hdr sg_io;
 
@@ -135,7 +135,7 @@ print_sg_io_v3_res(struct tcb *tcp, const long arg)
 #ifdef HAVE_LINUX_BSG_H
 
 static int
-print_sg_io_v4_req(struct tcb *tcp, const long arg)
+print_sg_io_v4_req(struct tcb *const tcp, const kernel_ureg_t arg)
 {
        struct sg_io_v4 sg_io;
 
@@ -173,7 +173,7 @@ print_sg_io_v4_req(struct tcb *tcp, const long arg)
 }
 
 static void
-print_sg_io_v4_res(struct tcb *tcp, const long arg)
+print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
 {
        struct sg_io_v4 sg_io;
        uint32_t din_len;
@@ -211,21 +211,22 @@ print_sg_io_v4_res(struct tcb *tcp, const long arg)
 #else /* !HAVE_LINUX_BSG_H */
 
 static int
-print_sg_io_v4_req(struct tcb *tcp, const long arg)
+print_sg_io_v4_req(struct tcb *const tcp, const kernel_ureg_t arg)
 {
        tprints("...}");
        return RVAL_DECODED | 1;
 }
 
 static void
-print_sg_io_v4_res(struct tcb *tcp, const long arg)
+print_sg_io_v4_res(struct tcb *const tcp, const kernel_ureg_t arg)
 {
 }
 
 #endif
 
 static int
-print_sg_io_req(struct tcb *tcp, uint32_t iid, const long arg)
+print_sg_io_req(struct tcb *const tcp, const uint32_t iid,
+               const kernel_ureg_t arg)
 {
        tprintf("{'%c', ", iid);
 
@@ -242,7 +243,8 @@ print_sg_io_req(struct tcb *tcp, uint32_t iid, const long arg)
 }
 
 static void
-print_sg_io_res(struct tcb *tcp, uint32_t iid, const long arg)
+print_sg_io_res(struct tcb *const tcp, const uint32_t iid,
+               const kernel_ureg_t arg)
 {
        switch (iid) {
        case 'S':
@@ -255,7 +257,8 @@ print_sg_io_res(struct tcb *tcp, uint32_t iid, const long arg)
 }
 
 int
-scsi_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+scsi_ioctl(struct tcb *const tcp, const unsigned int code,
+          const kernel_ureg_t arg)
 {
        uint32_t iid;
 
diff --git a/sock.c b/sock.c
index 3e197ed01971d620bd929e88b3ce7a7554e1e59a..dcc3e41ea670ab9826da4ef7f780940aca920a7e 100644 (file)
--- a/sock.c
+++ b/sock.c
@@ -50,8 +50,8 @@ print_ifname(const char *ifname)
 }
 
 static void
-print_ifreq(struct tcb *tcp, const unsigned int code, const long arg,
-           const struct ifreq *ifr)
+print_ifreq(struct tcb *const tcp, const unsigned int code,
+           const kernel_ureg_t arg, const struct ifreq *const ifr)
 {
        switch (code) {
        case SIOCSIFADDR:
@@ -132,7 +132,7 @@ print_ifc_len(int len)
 }
 
 static int
-decode_ifconf(struct tcb *tcp, const long addr)
+decode_ifconf(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct ifconf ifc;
 
@@ -195,7 +195,7 @@ decode_ifconf(struct tcb *tcp, const long addr)
 }
 
 int
-sock_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+sock_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ureg_t arg)
 {
        struct ifreq ifr;
 
diff --git a/term.c b/term.c
index 2b0be68ebeda4328b1ea6e3ac197e5ba9dccfcf6..62a2efebd5fe155882beab78a36513c8b8bd1b37 100644 (file)
--- a/term.c
+++ b/term.c
@@ -38,7 +38,7 @@
 #include "xlat/modem_flags.h"
 
 static void
-decode_termios(struct tcb *tcp, const long addr)
+decode_termios(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct termios tios;
        int i;
@@ -74,7 +74,7 @@ decode_termios(struct tcb *tcp, const long addr)
 }
 
 static void
-decode_termio(struct tcb *tcp, const long addr)
+decode_termio(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct termio tio;
        int i;
@@ -116,7 +116,7 @@ decode_termio(struct tcb *tcp, const long addr)
 }
 
 static void
-decode_winsize(struct tcb *tcp, const long addr)
+decode_winsize(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct winsize ws;
 
@@ -132,7 +132,7 @@ decode_winsize(struct tcb *tcp, const long addr)
 
 #ifdef TIOCGSIZE
 static void
-decode_ttysize(struct tcb *tcp, const long addr)
+decode_ttysize(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        struct ttysize ts;
 
@@ -148,7 +148,7 @@ decode_ttysize(struct tcb *tcp, const long addr)
 #endif
 
 static void
-decode_modem_flags(struct tcb *tcp, const long addr)
+decode_modem_flags(struct tcb *const tcp, const kernel_ureg_t addr)
 {
        int i;
 
@@ -164,7 +164,8 @@ decode_modem_flags(struct tcb *tcp, const long addr)
 }
 
 int
-term_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+term_ioctl(struct tcb *const tcp, const unsigned int code,
+          const kernel_ureg_t arg)
 {
        switch (code) {
        /* struct termios */
diff --git a/ubi.c b/ubi.c
index dfac0be0f298d5a2ebf05e9e9563bb735934dc7a..4d46a3cd0bdbd3b9e383dc0591ddd9fa33d1d7ff 100644 (file)
--- a/ubi.c
+++ b/ubi.c
@@ -40,7 +40,8 @@
 #include "xlat/ubi_volume_props.h"
 
 int
-ubi_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+ubi_ioctl(struct tcb *const tcp, const unsigned int code,
+         const kernel_ureg_t arg)
 {
        if (!verbose(tcp))
                return RVAL_DECODED;
index 07094a10c854d01fc2542364a31a70e383081a10..4be01d147e7ea56bec27c5fb6361dee01e1d93c8 100644 (file)
@@ -55,7 +55,8 @@ tprintf_uffdio_range(const struct uffdio_range *range)
 }
 
 int
-uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
+uffdio_ioctl(struct tcb *const tcp, const unsigned int code,
+            const kernel_ureg_t arg)
 {
        switch (code) {
        case UFFDIO_API: {