Discussion:
[PATCH 14/15] xfs: fix decimal printf format specifiers prefixed with 0x
Hans Wennborg
2014-08-06 04:44:16 UTC
Permalink
The prefix suggests the number should be printed in hex, so use
the %x specifier to do that.

Found by using regex suggested by Joe Perches.

Signed-off-by: Hans Wennborg <***@hanshq.net>
---
fs/xfs/xfs_discard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 13d08a1..b4a2415 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -228,7 +228,7 @@ xfs_discard_extents(
GFP_NOFS, 0);
if (error && error != -EOPNOTSUPP) {
xfs_info(mp,
- "discard failed for extent [0x%llu,%u], error %d",
+ "discard failed for extent [0x%llx,%u], error %d",
(unsigned long long)busyp->bno,
busyp->length,
error);
--
2.0.0.526.g5318336
Brian Foster
2014-08-06 12:24:42 UTC
Permalink
Post by Hans Wennborg
The prefix suggests the number should be printed in hex, so use
the %x specifier to do that.
Found by using regex suggested by Joe Perches.
---
fs/xfs/xfs_discard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 13d08a1..b4a2415 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -228,7 +228,7 @@ xfs_discard_extents(
GFP_NOFS, 0);
if (error && error != -EOPNOTSUPP) {
xfs_info(mp,
- "discard failed for extent [0x%llu,%u], error %d",
+ "discard failed for extent [0x%llx,%u], error %d",
(unsigned long long)busyp->bno,
busyp->length,
error);
It's kind of annoying seeing values of multiple bases being used to
describe a single extent, imo. But using 0x before a decimal value
certainly isn't nice... ;)
Post by Hans Wennborg
--
2.0.0.526.g5318336
_______________________________________________
xfs mailing list
http://oss.sgi.com/mailman/listinfo/xfs
Loading...