libparted 3.6
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
dos.c File Reference

Macros

#define _(String)   (String)
 
#define DOS_N_PRI_PARTITIONS   4
 
#define MAX_CHS_CYLINDER   1021
 
#define MAX_TOTAL_PART   64
 
#define MSDOS_MAGIC   0xAA55
 
#define PART_FLAG_HIDDEN   0x10 /* Valid for FAT/NTFS only */
 
#define PARTITION_BLS_BOOT   0xea
 
#define PARTITION_COMPAQ_DIAG   0x12
 
#define PARTITION_DELL_DIAG   0xde
 
#define PARTITION_DOS_EXT   0x05
 
#define PARTITION_DOS_EXT_H   (PARTITION_DOS_EXT | PART_FLAG_HIDDEN)
 
#define PARTITION_EMPTY   0x00
 
#define PARTITION_ESP   0xef
 
#define PARTITION_EXT_LBA   0x0f
 
#define PARTITION_FAT12   0x01
 
#define PARTITION_FAT12_H   (PARTITION_FAT12 | PART_FLAG_HIDDEN)
 
#define PARTITION_FAT16   0x06
 
#define PARTITION_FAT16_H   (PARTITION_FAT16 | PART_FLAG_HIDDEN)
 
#define PARTITION_FAT16_LBA   0x0e
 
#define PARTITION_FAT16_LBA_H   (PARTITION_FAT16_LBA | PART_FLAG_HIDDEN)
 
#define PARTITION_FAT16_SM   0x04
 
#define PARTITION_FAT16_SM_H   (PARTITION_FAT16_SM | PART_FLAG_HIDDEN)
 
#define PARTITION_FAT32   0x0b
 
#define PARTITION_FAT32_H   (PARTITION_FAT32 | PART_FLAG_HIDDEN)
 
#define PARTITION_FAT32_LBA   0x0c
 
#define PARTITION_FAT32_LBA_H   (PARTITION_FAT32_LBA | PART_FLAG_HIDDEN)
 
#define PARTITION_GPT   0xee
 
#define PARTITION_HFS   0xaf
 
#define PARTITION_HPFS   0x07
 
#define PARTITION_IRST   0x84
 
#define PARTITION_LDM   0x42
 
#define PARTITION_LINUX   0x83
 
#define PARTITION_LINUX_EXT   0x85
 
#define PARTITION_LINUX_LVM   0x8e
 
#define PARTITION_LINUX_LVM_OLD   0xfe
 
#define PARTITION_LINUX_RAID   0xfd
 
#define PARTITION_LINUX_SWAP   0x82
 
#define PARTITION_MAGIC_MAGIC   0xf6f6
 
#define PARTITION_MSFT_RECOVERY   0x27
 
#define PARTITION_NTFS   0x07
 
#define PARTITION_NTFS_H   (PARTITION_NTFS | PART_FLAG_HIDDEN)
 
#define PARTITION_PALO   0xf0
 
#define PARTITION_PREP   0x41
 
#define PARTITION_SUN_UFS   0xbf
 
#define PARTITION_UDF   0x07
 

Typedefs

typedef struct _DosRawPartition DosRawPartition
 
typedef struct _DosRawTable DosRawTable
 

Functions

struct _DosRawPartition __attribute__ ((packed))
 
PedGeometryfat_probe_fat16 (PedGeometry *geom)
 
PedGeometryfat_probe_fat32 (PedGeometry *geom)
 
uint8_t _GL_ATTRIBUTE_PURE msdos_partition_get_type_id (const PedPartition *part)
 
int msdos_partition_set_type_id (PedPartition *part, uint8_t id)
 
PedGeometryntfs_probe (PedGeometry *geom)
 
void ped_disk_msdos_done ()
 
void ped_disk_msdos_init ()
 
 PT_define_limit_functions (msdos)
 

Variables

typedef __attribute__
 
char boot_code [440]
 
uint8_t boot_ind
 
RawCHS chs_end
 
RawCHS chs_start
 
uint32_t length
 
uint16_t magic
 
uint32_t mbr_signature
 
DosRawPartition partitions [DOS_N_PRI_PARTITIONS]
 
uint32_t start
 
uint8_t type
 
uint16_t Unknown
 

Macro Definition Documentation

◆ _

#define _ (   String)    (String)

◆ DOS_N_PRI_PARTITIONS

#define DOS_N_PRI_PARTITIONS   4

◆ MAX_CHS_CYLINDER

#define MAX_CHS_CYLINDER   1021

◆ MAX_TOTAL_PART

#define MAX_TOTAL_PART   64

◆ MSDOS_MAGIC

#define MSDOS_MAGIC   0xAA55

◆ PART_FLAG_HIDDEN

#define PART_FLAG_HIDDEN   0x10 /* Valid for FAT/NTFS only */

◆ PARTITION_BLS_BOOT

#define PARTITION_BLS_BOOT   0xea

◆ PARTITION_COMPAQ_DIAG

#define PARTITION_COMPAQ_DIAG   0x12

◆ PARTITION_DELL_DIAG

#define PARTITION_DELL_DIAG   0xde

◆ PARTITION_DOS_EXT

#define PARTITION_DOS_EXT   0x05

◆ PARTITION_DOS_EXT_H

#define PARTITION_DOS_EXT_H   (PARTITION_DOS_EXT | PART_FLAG_HIDDEN)

◆ PARTITION_EMPTY

#define PARTITION_EMPTY   0x00

◆ PARTITION_ESP

#define PARTITION_ESP   0xef

◆ PARTITION_EXT_LBA

#define PARTITION_EXT_LBA   0x0f

◆ PARTITION_FAT12

#define PARTITION_FAT12   0x01

◆ PARTITION_FAT12_H

#define PARTITION_FAT12_H   (PARTITION_FAT12 | PART_FLAG_HIDDEN)

◆ PARTITION_FAT16

#define PARTITION_FAT16   0x06

◆ PARTITION_FAT16_H

#define PARTITION_FAT16_H   (PARTITION_FAT16 | PART_FLAG_HIDDEN)

◆ PARTITION_FAT16_LBA

#define PARTITION_FAT16_LBA   0x0e

◆ PARTITION_FAT16_LBA_H

#define PARTITION_FAT16_LBA_H   (PARTITION_FAT16_LBA | PART_FLAG_HIDDEN)

◆ PARTITION_FAT16_SM

#define PARTITION_FAT16_SM   0x04

◆ PARTITION_FAT16_SM_H

#define PARTITION_FAT16_SM_H   (PARTITION_FAT16_SM | PART_FLAG_HIDDEN)

◆ PARTITION_FAT32

#define PARTITION_FAT32   0x0b

◆ PARTITION_FAT32_H

#define PARTITION_FAT32_H   (PARTITION_FAT32 | PART_FLAG_HIDDEN)

◆ PARTITION_FAT32_LBA

#define PARTITION_FAT32_LBA   0x0c

◆ PARTITION_FAT32_LBA_H

#define PARTITION_FAT32_LBA_H   (PARTITION_FAT32_LBA | PART_FLAG_HIDDEN)

◆ PARTITION_GPT

#define PARTITION_GPT   0xee

◆ PARTITION_HFS

#define PARTITION_HFS   0xaf

◆ PARTITION_HPFS

#define PARTITION_HPFS   0x07

◆ PARTITION_IRST

#define PARTITION_IRST   0x84

◆ PARTITION_LDM

#define PARTITION_LDM   0x42

◆ PARTITION_LINUX

#define PARTITION_LINUX   0x83

◆ PARTITION_LINUX_EXT

#define PARTITION_LINUX_EXT   0x85

◆ PARTITION_LINUX_LVM

#define PARTITION_LINUX_LVM   0x8e

◆ PARTITION_LINUX_LVM_OLD

#define PARTITION_LINUX_LVM_OLD   0xfe

◆ PARTITION_LINUX_RAID

#define PARTITION_LINUX_RAID   0xfd

◆ PARTITION_LINUX_SWAP

#define PARTITION_LINUX_SWAP   0x82

◆ PARTITION_MAGIC_MAGIC

#define PARTITION_MAGIC_MAGIC   0xf6f6

◆ PARTITION_MSFT_RECOVERY

#define PARTITION_MSFT_RECOVERY   0x27

◆ PARTITION_NTFS

#define PARTITION_NTFS   0x07

◆ PARTITION_NTFS_H

#define PARTITION_NTFS_H   (PARTITION_NTFS | PART_FLAG_HIDDEN)

◆ PARTITION_PALO

#define PARTITION_PALO   0xf0

◆ PARTITION_PREP

#define PARTITION_PREP   0x41

◆ PARTITION_SUN_UFS

#define PARTITION_SUN_UFS   0xbf

◆ PARTITION_UDF

#define PARTITION_UDF   0x07

Typedef Documentation

◆ DosRawPartition

typedef struct _DosRawPartition DosRawPartition

◆ DosRawTable

typedef struct _DosRawTable DosRawTable

Function Documentation

◆ __attribute__()

struct _DosRawPartition __attribute__ ( (packed)  )

◆ fat_probe_fat16()

PedGeometry * fat_probe_fat16 ( PedGeometry geom)

◆ fat_probe_fat32()

PedGeometry * fat_probe_fat32 ( PedGeometry geom)

◆ msdos_partition_get_type_id()

uint8_t _GL_ATTRIBUTE_PURE msdos_partition_get_type_id ( const PedPartition part)

◆ msdos_partition_set_type_id()

int msdos_partition_set_type_id ( PedPartition part,
uint8_t  id 
)

◆ ntfs_probe()

PedGeometry * ntfs_probe ( PedGeometry geom)

◆ ped_disk_msdos_done()

void ped_disk_msdos_done ( )

◆ ped_disk_msdos_init()

void ped_disk_msdos_init ( )

◆ PT_define_limit_functions()

PT_define_limit_functions ( msdos  )

Variable Documentation

◆ __attribute__

typedef __attribute__

◆ boot_code

char boot_code[440]

◆ boot_ind

uint8_t boot_ind

◆ chs_end

RawCHS chs_end

◆ chs_start

RawCHS chs_start

◆ length

uint32_t length

◆ magic

uint16_t magic

◆ mbr_signature

uint32_t mbr_signature

◆ partitions

◆ start

uint32_t start

◆ type

uint8_t type

◆ Unknown

uint16_t Unknown