[PATCH 05/11] fallocate: Change print format of offset and len arguments to signed

Eugene Syromyatnikov evgsyr at gmail.com
Wed Sep 21 21:21:14 UTC 2016


Since types of these arguments is off_t and kernel actually expects
signed values (in order to fail in case negative values are provided),
it is reasonable to display these values as signed as well.

* fallocate.c (SYS_FUNC(fallocate)): Change conversion specifier for
  printing "offset" and "len" syscall arguments from %llu to %lld.
---
 fallocate.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fallocate.c b/fallocate.c
index 0b1cfec..b707279 100644
--- a/fallocate.c
+++ b/fallocate.c
@@ -19,10 +19,10 @@ SYS_FUNC(fallocate)
 	tprints(", ");
 
 	/* offset */
-	argn = printllval(tcp, "%llu, ", 2);
+	argn = printllval(tcp, "%lld, ", 2);
 
 	/* len */
-	printllval(tcp, "%llu", argn);
+	printllval(tcp, "%lld", argn);
 
 	return RVAL_DECODED;
 }
-- 
1.7.10.4





More information about the Strace-devel mailing list