From: Darrick J. Wong Date: Wed, 17 Apr 2024 23:16:50 +0000 (-0700) Subject: libxfs: print the device name if flush-on-close fails X-Git-Tag: v6.8.0~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa70379081a903b2ebe502e4d3ad8ebffbe30bee;p=thirdparty%2Fxfsprogs-dev.git libxfs: print the device name if flush-on-close fails Print the name of the device if persisting the write cache fails. Printing a pointer does not help the user at all, and this causes the 32-bit build to complain: init.c: In function ‘libxfs_device_close’: init.c:178:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 178 | progname, (long long)dev, ret); | ^ cc1: all warnings being treated as errors Fixes: fc83c7574b1f ("libxfs: split out a libxfs_dev structure from struct libxfs_init") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/init.c b/libxfs/init.c index 1e035c48..6ac9d682 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -171,8 +171,8 @@ libxfs_device_close( if (ret) { ret = -errno; fprintf(stderr, - _("%s: flush of device %lld failed, err=%d"), - progname, (long long)dev, ret); + _("%s: flush of device %s failed, err=%d"), + progname, dev->name, ret); } close(dev->fd);