From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Sat, 26 Aug 2017 22:39:24 +0000 (+0200)
Subject: Do not return RVAL_DECODED on exiting path of ioctl decoders
X-Git-Tag: v4.19~48
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abc0ad04424c516454f7734c8c7443798ba88916;p=strace

Do not return RVAL_DECODED on exiting path of ioctl decoders

* print_sg_req_info.c (decode_sg_req_info): Return 1 instead of
RVAL_DECODED | 1 on exiting path.
* scsi.c (decode_sg_scsi_id): Likewise.
* sg_io_v3.c (decode_response): Likewise.
* sg_io_v4.c (decode_response): Likewise.
---

diff --git a/print_sg_req_info.c b/print_sg_req_info.c
index 9f0249ec..cb34d4fd 100644
--- a/print_sg_req_info.c
+++ b/print_sg_req_info.c
@@ -68,7 +68,7 @@ MPERS_PRINTER_DECL(int, decode_sg_req_info,
 		tprintf(", duration=%u}", info.duration);
 	}
 
-	return RVAL_DECODED | 1;
+	return 1;
 }
 
 #endif /* HAVE_SCSI_SG_H */
diff --git a/scsi.c b/scsi.c
index 35796201..43b829a3 100644
--- a/scsi.c
+++ b/scsi.c
@@ -78,7 +78,7 @@ decode_sg_scsi_id(struct tcb *const tcp, const kernel_ulong_t arg)
 			id.h_cmd_per_lun,
 			id.d_queue_depth);
 	}
-	return RVAL_DECODED | 1;
+	return 1;
 }
 
 #endif /* HAVE_SCSI_SG_H */
diff --git a/sg_io_v3.c b/sg_io_v3.c
index ebeb66c4..1be078fb 100644
--- a/sg_io_v3.c
+++ b/sg_io_v3.c
@@ -117,12 +117,12 @@ decode_response(struct tcb *const tcp, const kernel_ulong_t arg)
 		if (entering_sg_io->dxfer_direction == SG_DXFER_FROM_DEV)
 			PRINT_FIELD_PTR(", ", *entering_sg_io, dxferp);
 		PRINT_FIELD_PTR(", ", *entering_sg_io, sbp);
-		return RVAL_DECODED | 1;
+		return 1;
 	}
 
 	if (sg_io.interface_id != entering_sg_io->interface_id) {
 		PRINT_FIELD_U(" => ", sg_io, interface_id);
-		return RVAL_DECODED | 1;
+		return 1;
 	}
 
 	if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV ||
@@ -155,7 +155,7 @@ decode_response(struct tcb *const tcp, const kernel_ulong_t arg)
 	PRINT_FIELD_U(", ", sg_io, duration);
 	PRINT_FIELD_FLAGS(", ", sg_io, info, sg_io_info, "SG_INFO_???");
 
-	return RVAL_DECODED | 1;
+	return 1;
 }
 
 #else /* !HAVE_SCSI_SG_H */
diff --git a/sg_io_v4.c b/sg_io_v4.c
index 68a5cbc8..48442f2a 100644
--- a/sg_io_v4.c
+++ b/sg_io_v4.c
@@ -111,12 +111,12 @@ decode_response(struct tcb *const tcp, const kernel_ulong_t arg)
 		/* print i/o fields fetched on entering syscall */
 		PRINT_FIELD_X(", ", *entering_sg_io, response);
 		PRINT_FIELD_X(", ", *entering_sg_io, din_xferp);
-		return RVAL_DECODED | 1;
+		return 1;
 	}
 
 	if (sg_io.guard != entering_sg_io->guard) {
 		PRINT_FIELD_U(" => ", sg_io, guard);
-		return RVAL_DECODED | 1;
+		return 1;
 	}
 
 	PRINT_FIELD_U(", ", sg_io, response_len);
@@ -138,7 +138,7 @@ decode_response(struct tcb *const tcp, const kernel_ulong_t arg)
 	PRINT_FIELD_D(", ", sg_io, dout_resid);
 	PRINT_FIELD_X(", ", sg_io, generated_tag);
 
-	return RVAL_DECODED | 1;
+	return 1;
 }
 
 #else /* !HAVE_LINUX_BSG_H */