Change type of ioctl 3rd argument from long to kernel_ureg_t
* 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.
This commit is contained in:
parent
98f8b95b0f
commit
10350d5eb0
2
defs.h
2
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);
|
||||
|
7
dm.c
7
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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
2
ioctl.c
2
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)
|
||||
|
7
loop.c
7
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;
|
||||
|
3
ptp.c
3
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;
|
||||
|
21
scsi.c
21
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;
|
||||
|
||||
|
8
sock.c
8
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;
|
||||
|
||||
|
13
term.c
13
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 */
|
||||
|
3
ubi.c
3
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;
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user