libparted 3.6
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
bootsector.h File Reference

Go to the source code of this file.

Macros

#define FAT32_INFO_MAGIC1   0x41615252
 
#define FAT32_INFO_MAGIC2   0x61417272
 
#define FAT32_INFO_MAGIC3   0xaa55
 
#define FAT_BOOT_CODE
 
#define FAT_BOOT_CODE_LENGTH   128
 
#define FAT_BOOT_JUMP   "\xeb\x58\x90" /* jmp +5a */
 
#define FAT_BOOT_MESSAGE
 

Typedefs

typedef struct _FatBootSector FatBootSector
 
typedef struct _FatInfoSector FatInfoSector
 

Functions

struct __attribute__ ((packed)) _FatBootSector
 
int fat_boot_sector_analyse (FatBootSector *bs, PedFileSystem *fs)
 
FatType fat_boot_sector_probe_type (const FatBootSector *bs, const PedGeometry *geom)
 
int fat_boot_sector_read (FatBootSector **bs, const PedGeometry *geom)
 

Macro Definition Documentation

◆ FAT32_INFO_MAGIC1

#define FAT32_INFO_MAGIC1   0x41615252

◆ FAT32_INFO_MAGIC2

#define FAT32_INFO_MAGIC2   0x61417272

◆ FAT32_INFO_MAGIC3

#define FAT32_INFO_MAGIC3   0xaa55

◆ FAT_BOOT_CODE

#define FAT_BOOT_CODE
Value:
"\x0e" /* push cs */ \
"\x1f" /* pop ds */ \
"\xbe\x74\x7e" /* mov si, offset message */ \
/* write_msg_loop: */ \
"\xac" /* lodsb */ \
"\x22\xc0" /* and al, al */ \
"\x74\x06" /* jz done (+8) */ \
"\xb4\x0e" /* mov ah, 0x0e */ \
"\xcd\x10" /* int 0x10 */ \
"\xeb\xf5" /* jmp write_msg_loop */ \
/* done: */ \
"\xb4\x00" /* mov ah, 0x00 */ \
"\xcd\x16" /* int 0x16 */ \
"\xb4\x00" /* mov ah, 0x00 */ \
"\xcd\x19" /* int 0x19 */ \
"\xeb\xfe" /* jmp +0 - in case int 0x19 */ \
/* doesn't work */ \
/* message: */ \
#define FAT_BOOT_MESSAGE
Definition: bootsector.h:34

◆ FAT_BOOT_CODE_LENGTH

#define FAT_BOOT_CODE_LENGTH   128

◆ FAT_BOOT_JUMP

#define FAT_BOOT_JUMP   "\xeb\x58\x90" /* jmp +5a */

◆ FAT_BOOT_MESSAGE

#define FAT_BOOT_MESSAGE
Value:
"This partition does not have an operating system loader installed on it.\n\r"\
"Press a key to reboot..."

Typedef Documentation

◆ FatBootSector

typedef struct _FatBootSector FatBootSector

◆ FatInfoSector

typedef struct _FatInfoSector FatInfoSector

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ fat_boot_sector_analyse()

int fat_boot_sector_analyse ( FatBootSector bs,
PedFileSystem fs 
)

◆ fat_boot_sector_probe_type()

FatType fat_boot_sector_probe_type ( const FatBootSector bs,
const PedGeometry geom 
)

◆ fat_boot_sector_read()

int fat_boot_sector_read ( FatBootSector **  bs,
const PedGeometry geom 
)