mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -04:00
[sl] update to syslinux 4.06
* Also fixes MSVC 64 bit warnings in format.c and iso.c
This commit is contained in:
parent
22800bb8a5
commit
a352ad019d
8 changed files with 34 additions and 19 deletions
|
@ -23,6 +23,23 @@
|
|||
# define X86_MEM 0
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# ifdef __MINGW32__
|
||||
/* gcc 4.7 miscompiles packed structures in MS-bitfield mode */
|
||||
# define GNUC_PACKED __attribute__((packed,gcc_struct))
|
||||
# else
|
||||
# define GNUC_PACKED __attribute__((packed))
|
||||
# endif
|
||||
# define PRAGMA_BEGIN_PACKED
|
||||
# define PRAGMA_END_PACKED
|
||||
#elif defined(_MSC_VER)
|
||||
# define GNUC_PACKED
|
||||
# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1))
|
||||
# define PRAGMA_END_PACKED __pragma(pack(pop))
|
||||
#else
|
||||
# error "Need to define PACKED for this compiler"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Access functions for littleendian numbers, possibly misaligned.
|
||||
*/
|
||||
|
@ -187,11 +204,11 @@ struct ext_patch_area {
|
|||
};
|
||||
|
||||
/* Sector extent */
|
||||
#pragma pack(push, 1)
|
||||
PRAGMA_BEGIN_PACKED
|
||||
struct syslinux_extent {
|
||||
uint64_t lba;
|
||||
uint16_t len;
|
||||
};
|
||||
} GNUC_PACKED;
|
||||
|
||||
/* FAT bootsector format, also used by other disk-based derivatives */
|
||||
struct fat_boot_sector {
|
||||
|
@ -219,7 +236,7 @@ struct fat_boot_sector {
|
|||
char VolumeLabel[11];
|
||||
char FileSysType[8];
|
||||
uint8_t Code[442];
|
||||
} bs16;
|
||||
} GNUC_PACKED bs16;
|
||||
struct {
|
||||
uint32_t FATSz32;
|
||||
uint16_t ExtFlags;
|
||||
|
@ -235,13 +252,13 @@ struct fat_boot_sector {
|
|||
char VolumeLabel[11];
|
||||
char FileSysType[8];
|
||||
uint8_t Code[414];
|
||||
} bs32;
|
||||
};
|
||||
} GNUC_PACKED bs32;
|
||||
} GNUC_PACKED;
|
||||
|
||||
uint32_t bsMagic;
|
||||
uint16_t bsForwardPtr;
|
||||
uint16_t bsSignature;
|
||||
};
|
||||
} GNUC_PACKED;
|
||||
|
||||
/* NTFS bootsector format */
|
||||
struct ntfs_boot_sector {
|
||||
|
@ -274,8 +291,8 @@ struct ntfs_boot_sector {
|
|||
uint32_t bsMagic;
|
||||
uint16_t bsForwardPtr;
|
||||
uint16_t bsSignature;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
} GNUC_PACKED;
|
||||
PRAGMA_END_PACKED
|
||||
|
||||
#define FAT_bsHead bsJump
|
||||
#define FAT_bsHeadLen offsetof(struct fat_boot_sector, bsBytesPerSec)
|
||||
|
|
|
@ -97,8 +97,6 @@ static inline void *ptr(void *img, uint16_t *offset_p)
|
|||
* Returns the number of modified bytes in ldlinux.sys if successful,
|
||||
* otherwise -1.
|
||||
*/
|
||||
#define NADV 2
|
||||
|
||||
int syslinux_patch(const sector_t *sectp, int nsectors,
|
||||
int stupid, int raid_mode,
|
||||
const char *subdir, const char *subvol)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue