DOS

DOS — disk label specific functions

Functions

Types and Values

#define DOS_FLAG_ACTIVE

Description

Functions

fdisk_dos_enable_compatible ()

int
fdisk_dos_enable_compatible (struct fdisk_label *lb,
                             int enable);

Enables deprecated DOS compatible mode, in this mode library checks for cylinders boundary, cases about CHS addressing and another obscure things.

Parameters

lb

DOS label (see fdisk_get_label())

 

enable

0 or 1

 

Returns

0 on success, <0 on error.


fdisk_dos_is_compatible ()

int
fdisk_dos_is_compatible (struct fdisk_label *lb);

Parameters

lb

DOS label

 

Returns

0 if DOS compatibility disabled, 1 if enabled


fdisk_dos_move_begin ()

int
fdisk_dos_move_begin (struct fdisk_context *cxt,
                      size_t i);

fdisk_dos_fix_chs ()

int
fdisk_dos_fix_chs (struct fdisk_context *cxt);

Fix beginning and ending C/H/S values for every partition according to LBA relative offset, relative beginning and size and fdisk idea of disk geometry (sectors per track and number of heads).

Parameters

cxt

fdisk context

 

Returns

number of fixed (changed) partitions.

Types and Values

DOS_FLAG_ACTIVE

#define DOS_FLAG_ACTIVE 1