Rename GetFileSize to GetSectorFileSize to avoid conflict with WinAPI
All checks were successful
Builds / XTchain (minimal, linux) (push) Successful in 2m6s
Builds / XTchain (minimal, windows) (push) Successful in 1m53s
Builds / XTchain (full, linux) (push) Successful in 55m48s
Builds / XTchain (full, windows) (push) Successful in 1h23m56s

This commit is contained in:
2025-10-02 22:19:54 +02:00
parent 09e54a670a
commit e16284f3aa

View File

@@ -23,7 +23,7 @@ static RESERVED_SECTOR_INFO Fat32ReservedMap[] =
static void CopyData(const char *Image, long Offset, const char *SourceDir, const char *Relative); static void CopyData(const char *Image, long Offset, const char *SourceDir, const char *Relative);
static void CopyImageFile(const char *Image, long Offset, const char *SourceFile, const char *Relative); static void CopyImageFile(const char *Image, long Offset, const char *SourceFile, const char *Relative);
static long DetermineExtraSector(long sectors_to_write); static long DetermineExtraSector(long sectors_to_write);
long GetFileSize(const char *FileName); long GetSectorFileSize(const char *FileName);
int LoadSectors(const char *FileName, uint8_t *Buffer, int SectorCount); int LoadSectors(const char *FileName, uint8_t *Buffer, int SectorCount);
static void MakeDirectory(const char *Image, long Offset, const char *Relative); static void MakeDirectory(const char *Image, long Offset, const char *Relative);
@@ -158,7 +158,7 @@ static long DetermineExtraSector(long sectors_to_write)
} }
/* Gets the size of a file */ /* Gets the size of a file */
long GetFileSize(const char *FileName) long GetSectorFileSize(const char *FileName)
{ {
FILE *File; FILE *File;
long Size; long Size;
@@ -189,7 +189,7 @@ int LoadSectors(const char *FileName, uint8_t *Buffer, int SectorCount)
long BytesToRead = SectorCount * SECTOR_SIZE; long BytesToRead = SectorCount * SECTOR_SIZE;
/* Get and validate file size */ /* Get and validate file size */
FileSize = GetFileSize(FileName); FileSize = GetSectorFileSize(FileName);
if(FileSize < 0) if(FileSize < 0)
{ {
/* Failed to get file size */ /* Failed to get file size */
@@ -479,7 +479,7 @@ int main(int argc, char **argv)
/* Write VBR to the start of the partition, if provided */ /* Write VBR to the start of the partition, if provided */
if(VbrFile) if(VbrFile)
{ {
VbrFileSize = GetFileSize(VbrFile); VbrFileSize = GetSectorFileSize(VbrFile);
if(VbrFileSize < 0) if(VbrFileSize < 0)
{ {
/* The GetFileSize function already prints a perror message */ /* The GetFileSize function already prints a perror message */