]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: Fix mismatched return type of filesize()
authorPavel Reichl <preichl@redhat.com>
Fri, 21 Feb 2025 18:57:57 +0000 (19:57 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 27 Feb 2025 19:23:07 +0000 (20:23 +0100)
The function filesize() was declared with a return type of 'long' but
defined with 'off_t'. This mismatch caused build issues due to type
incompatibility.

This commit updates the declaration to match the definition, ensuring
consistency and preventing potential compilation errors.

Fixes: 73fb78e5ee8 ("mkfs: support copying in large or sparse files")
Signed-off-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cem@kernel.org>
Fixes: 73fb78e5ee8 ("mkfs: support copying in large or sparse files")
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
mkfs/proto.c

index 2c45348027166689f1b2fd10c5d059bc40a92a36..7f56a3d82a067f2b66ae035c66aa3ba025601425 100644 (file)
@@ -20,7 +20,7 @@ static struct xfs_trans * getres(struct xfs_mount *mp, uint blocks);
 static void rsvfile(xfs_mount_t *mp, xfs_inode_t *ip, long long len);
 static int newregfile(char **pp, char **fname);
 static void rtinit(xfs_mount_t *mp);
-static long filesize(int fd);
+static off_t filesize(int fd);
 static int slashes_are_spaces;
 
 /*