From 426b63f3fa7b0a512b6617833270f2da4dc55e94 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Sun, 1 Jan 2017 22:19:18 +0300 Subject: [PATCH] loop: print lo_encrypt_key_size field of struct loop_info as unsigned It is converted to an unsigned value in kernel (see loop_info64_from_old in drivers/block/loop.c), so let's print it that way despite its type. * loop.c (decode_loop_info): Print lo_encrypt_key_size as an uint32_t value. --- loop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/loop.c b/loop.c index e43fcaad..50b9b3e4 100644 --- a/loop.c +++ b/loop.c @@ -64,7 +64,12 @@ decode_loop_info(struct tcb *const tcp, const kernel_ulong_t addr) tprints(", lo_encrypt_type="); printxval(loop_crypt_type_options, info.lo_encrypt_type, "LO_CRYPT_???"); - tprintf(", lo_encrypt_key_size=%d", info.lo_encrypt_key_size); + /* + * It is converted to unsigned before use in kernel, see + * loop_info64_from_old in drivers/block/loop.c + */ + tprintf(", lo_encrypt_key_size=%" PRIu32, + (uint32_t) info.lo_encrypt_key_size); } tprints(", lo_flags=");