From e891e0aaa674addcc317c37bb0503f5fc0a5e619 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sat, 5 Dec 2020 14:08:11 +0900 Subject: [PATCH] fs/nxffs/nxffs_pack.c: Fix syslog formats --- fs/nxffs/nxffs_pack.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/fs/nxffs/nxffs_pack.c b/fs/nxffs/nxffs_pack.c index aefff8778b3..e76063e7e19 100644 --- a/fs/nxffs/nxffs_pack.c +++ b/fs/nxffs/nxffs_pack.c @@ -41,6 +41,7 @@ #include +#include #include #include #include @@ -1434,7 +1435,8 @@ start_pack: volume->pack); if (ret < 0) { - ferr("ERROR: Failed to read erase block %d: %d\n", eblock, -ret); + ferr("ERROR: Failed to read erase block %jd: %d\n", + (intmax_t)eblock, -ret); goto errout_with_pack; } @@ -1532,9 +1534,9 @@ start_pack: { /* Otherwise, something really bad happened */ - ferr("ERROR: Failed to pack into block %d: " + ferr("ERROR: Failed to pack into block %jd: " "%d\n", - block, ret); + (intmax_t)block, ret); goto errout_with_pack; } } @@ -1567,9 +1569,9 @@ start_pack: { /* Otherwise, something really bad happened */ - ferr("ERROR: Failed to pack into block %d: " + ferr("ERROR: Failed to pack into block %jd: " "%d\n", - block, ret); + (intmax_t)block, ret); goto errout_with_pack; } } @@ -1602,8 +1604,8 @@ start_pack: ret = MTD_ERASE(volume->mtd, eblock, 1); if (ret < 0) { - ferr("ERROR: Failed to erase block %d [%d]: %d\n", - eblock, pack.block0, -ret); + ferr("ERROR: Failed to erase block %jd [%jd]: %d\n", + (intmax_t)eblock, (intmax_t)pack.block0, -ret); goto errout_with_pack; } @@ -1613,8 +1615,8 @@ start_pack: volume->pack); if (ret < 0) { - ferr("ERROR: Failed to write erase block %d [%d]: %d\n", - eblock, pack.block0, -ret); + ferr("ERROR: Failed to write erase block %jd [%jd]: %d\n", + (intmax_t)eblock, (intmax_t)pack.block0, -ret); goto errout_with_pack; } }