]> granicus.if.org Git - strace/commitdiff
fallocate: change print format of offset and len arguments to signed
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 21 Sep 2016 21:21:14 +0000 (00:21 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 27 Sep 2016 18:02:07 +0000 (18:02 +0000)
Since types of these arguments are off_t and kernel actually expects
signed values in order to fail when negative values are provided,
lets display these values as signed.

* fallocate.c (SYS_FUNC(fallocate)): Change conversion specifier for
printing "offset" and "len" syscall arguments from %llu to %lld.

fallocate.c

index 0b1cfec995e973f453906bf676b7fe82e26f50b3..b707279c5190af86bee8a75ed8c4abb565db4cfb 100644 (file)
@@ -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;
 }