diff options
Diffstat (limited to 'msdos.h')
-rw-r--r-- | msdos.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -33,8 +33,8 @@ #define NEW 1 #define OLD 0 -#define _WORD(x) ((unsigned short)((unsigned char)(x)[0] + (((unsigned char)(x)[1]) << 8))) -#define _DWORD(x) ((unsigned int)(_WORD(x) + (_WORD((x)+2) << 16))) +#define _WORD(x) ((uint16_t)((unsigned char)(x)[0] + (((unsigned char)(x)[1]) << 8))) +#define _DWORD(x) ((uint32_t)(_WORD(x) + (_WORD((x)+2) << 16))) #define DELMARK ((char) 0xe5) #define ENDMARK ((char) 0x00) @@ -67,7 +67,7 @@ struct directory { #define STARTHI(dir) (_WORD((dir)->startHi)) /* ASSUMPTION: long is at least 32 bits */ -UNUSED(static __inline__ void set_dword(unsigned char *data, unsigned long value)) +UNUSED(static __inline__ void set_dword(unsigned char *data, uint32_t value)) { data[3] = (value >> 24) & 0xff; data[2] = (value >> 16) & 0xff; @@ -164,7 +164,7 @@ typedef struct oldboot_t { struct bootsector_s { unsigned char jump[3]; /* 0 Jump to boot code */ - char banner[8]; /* 3 OEM name & version */ + char banner[8] NONULLTERM; /* 3 OEM name & version */ unsigned char secsiz[2]; /* 11 Bytes per sector hopefully 512 */ unsigned char clsiz; /* 13 Cluster size in sectors */ unsigned char nrsvsect[2]; /* 14 Number of reserved (boot) sectors */ |