blob: e5bb09425f7e699a9f144a96d725189b15ca44af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
https://lore.kernel.org/linux-xfs/20250221185757.79333-1-preichl@redhat.com/
From: Pavel Reichl <preichl@redhat.com>
To: aalbersh@redhat.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH v2] xfsprogs: Fix mismatched return type of filesize()
Date: Fri, 21 Feb 2025 19:57:57 +0100
Message-ID: <20250221185757.79333-1-preichl@redhat.com>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20250217155043.78452-1-preichl@redhat.com>
References: <20250217155043.78452-1-preichl@redhat.com>
Precedence: bulk
X-Mailing-List: linux-xfs@vger.kernel.org
List-Id: <linux-xfs.vger.kernel.org>
List-Subscribe: <mailto:linux-xfs+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-xfs+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
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>
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -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;
/*
--
2.48.1
|