From: Eugene Syromyatnikov Date: Sat, 26 Aug 2017 22:18:27 +0000 (+0200) Subject: Return 0 instead of 1 on entering path of ioctl decoders X-Git-Tag: v4.19~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3de6f8fe8aa146c0e3efafd28e826a450ffa1cef;p=strace Return 0 instead of 1 on entering path of ioctl decoders As returning 1 (without RVAL_DECODED) on entering makes no sense. * block.c (block_ioctl) : Replace return 1 with return 0 on entering path. * ptp.c (ptp_ioctl) : Likewise. * sg_io_v3.c (decode_request): Likewise. * sg_io_v4.c (decode_request): Likewise. * sock.c (decode)ifconf, sock_ioctl) : Likewise. * ubi.c (ubi_ioctl) : Likewise. * v4l2.c (print_v4l2_ext_controls): Likewise. Co-authored-by: Dmitry V. Levin --- diff --git a/block.c b/block.c index 99b76dac..486c6df0 100644 --- a/block.c +++ b/block.c @@ -244,7 +244,7 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp, PRINT_FIELD_U(", ", buts, start_lba); PRINT_FIELD_U(", ", buts, end_lba); PRINT_FIELD_U(", ", buts, pid); - return 1; + return 0; } else { struct_blk_user_trace_setup buts; diff --git a/ptp.c b/ptp.c index 6a8a9d26..6d3ddd8a 100644 --- a/ptp.c +++ b/ptp.c @@ -85,7 +85,7 @@ ptp_ioctl(struct tcb *const tcp, const unsigned int code, break; tprintf("{n_samples=%u", sysoff.n_samples); - return 1; + return 0; } else { unsigned int n_samples, i; diff --git a/sg_io_v3.c b/sg_io_v3.c index f31fb034..ebeb66c4 100644 --- a/sg_io_v3.c +++ b/sg_io_v3.c @@ -103,7 +103,7 @@ decode_request(struct tcb *const tcp, const kernel_ulong_t arg) set_tcb_priv_data(tcp, entering_sg_io, free); } - return 1; + return 0; } static int diff --git a/sg_io_v4.c b/sg_io_v4.c index f4a69255..68a5cbc8 100644 --- a/sg_io_v4.c +++ b/sg_io_v4.c @@ -97,7 +97,7 @@ decode_request(struct tcb *const tcp, const kernel_ulong_t arg) set_tcb_priv_data(tcp, entering_sg_io, free); } - return 1; + return 0; } static int diff --git a/sock.c b/sock.c index e6d63c0b..c6bb6552 100644 --- a/sock.c +++ b/sock.c @@ -208,7 +208,7 @@ decode_ifconf(struct tcb *const tcp, const kernel_ulong_t addr) set_tcb_priv_data(tcp, ifc, free); - return 1; + return 0; } /* exiting */ @@ -344,7 +344,7 @@ MPERS_PRINTER_DECL(int, sock_ioctl, tprints("{ifr_name="); print_ifname(ifr.ifr_name); } - return 1; + return 0; } else { if (syserror(tcp)) { tprints("}"); diff --git a/ubi.c b/ubi.c index 9fa41e1c..6611bd46 100644 --- a/ubi.c +++ b/ubi.c @@ -67,7 +67,7 @@ ubi_ioctl(struct tcb *const tcp, const unsigned int code, CLAMP(mkvol.name_len, 0, UBI_MAX_VOLUME_NAME)); tprints("}"); - return 1; + return 0; } if (!syserror(tcp)) { tprints(" => "); @@ -135,7 +135,7 @@ ubi_ioctl(struct tcb *const tcp, const unsigned int code, ", max_beb_per1024=%" PRIi16 "}", attach.ubi_num, attach.mtd_num, attach.vid_hdr_offset, attach.max_beb_per1024); - return 1; + return 0; } if (!syserror(tcp)) { tprints(" => "); diff --git a/v4l2.c b/v4l2.c index 43d6c6e6..6f5f6bff 100644 --- a/v4l2.c +++ b/v4l2.c @@ -825,7 +825,9 @@ print_v4l2_ext_controls(struct tcb *const tcp, const kernel_ulong_t arg, tprints("}"); return RVAL_DECODED | 1; } - return 1; + + /* entering */ + return 0; } #endif /* VIDIOC_S_EXT_CTRLS */