libfdisk: add docs for DOS functions
This commit is contained in:
parent
a4e6a45e54
commit
b7d101a20d
|
@ -19,6 +19,14 @@
|
||||||
#define MAXIMUM_PARTS 60
|
#define MAXIMUM_PARTS 60
|
||||||
#define ACTIVE_FLAG 0x80
|
#define ACTIVE_FLAG 0x80
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION: dos
|
||||||
|
* @title: MBR (DOS) functions
|
||||||
|
* @short_description: MBR disk label specific functions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define IS_EXTENDED(i) \
|
#define IS_EXTENDED(i) \
|
||||||
((i) == MBR_DOS_EXTENDED_PARTITION \
|
((i) == MBR_DOS_EXTENDED_PARTITION \
|
||||||
|| (i) == MBR_W95_EXTENDED_PARTITION \
|
|| (i) == MBR_W95_EXTENDED_PARTITION \
|
||||||
|
@ -2289,10 +2297,16 @@ struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt)
|
||||||
return lb;
|
return lb;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Public label specific functions
|
* fdisk_dos_enable_compatible:
|
||||||
|
* @lb: DOS label (see fdisk_get_label())
|
||||||
|
* @enable: 0 or 1
|
||||||
|
*
|
||||||
|
* Enables deprecated DOS compatible mode, in this mode library checks for
|
||||||
|
* cylinders boundary, cases about CHS addressing and another obscure things.
|
||||||
|
*
|
||||||
|
* Returns: 0 on success, <0 on error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable)
|
int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable)
|
||||||
{
|
{
|
||||||
struct fdisk_dos_label *dos = (struct fdisk_dos_label *) lb;
|
struct fdisk_dos_label *dos = (struct fdisk_dos_label *) lb;
|
||||||
|
@ -2306,6 +2320,12 @@ int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fdisk_dos_is_compatible:
|
||||||
|
* @lb: DOS label
|
||||||
|
*
|
||||||
|
* Returns: 0 if DOS compatibility disabled, 1 if enabled
|
||||||
|
*/
|
||||||
int fdisk_dos_is_compatible(struct fdisk_label *lb)
|
int fdisk_dos_is_compatible(struct fdisk_label *lb)
|
||||||
{
|
{
|
||||||
return ((struct fdisk_dos_label *) lb)->compatible;
|
return ((struct fdisk_dos_label *) lb)->compatible;
|
||||||
|
|
|
@ -431,4 +431,9 @@ int fdisk_info_new_partition(
|
||||||
int num, sector_t start, sector_t stop,
|
int num, sector_t start, sector_t stop,
|
||||||
struct fdisk_parttype *t);
|
struct fdisk_parttype *t);
|
||||||
|
|
||||||
|
/* dos.c */
|
||||||
|
extern struct dos_partition *fdisk_dos_get_partition(
|
||||||
|
struct fdisk_context *cxt,
|
||||||
|
size_t i);
|
||||||
|
|
||||||
#endif /* _LIBFDISK_PRIVATE_H */
|
#endif /* _LIBFDISK_PRIVATE_H */
|
||||||
|
|
|
@ -359,6 +359,9 @@ extern int fdisk_iter_get_direction(struct fdisk_iter *itr);
|
||||||
|
|
||||||
|
|
||||||
/* dos.c */
|
/* dos.c */
|
||||||
|
#define DOS_FLAG_ACTIVE 1
|
||||||
|
|
||||||
|
extern int fdisk_dos_move_begin(struct fdisk_context *cxt, size_t i);
|
||||||
extern int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable);
|
extern int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable);
|
||||||
extern int fdisk_dos_is_compatible(struct fdisk_label *lb);
|
extern int fdisk_dos_is_compatible(struct fdisk_label *lb);
|
||||||
|
|
||||||
|
@ -412,14 +415,6 @@ enum {
|
||||||
|
|
||||||
extern int fdisk_gpt_is_hybrid(struct fdisk_context *cxt);
|
extern int fdisk_gpt_is_hybrid(struct fdisk_context *cxt);
|
||||||
|
|
||||||
/* dos.c */
|
|
||||||
extern struct dos_partition *fdisk_dos_get_partition(
|
|
||||||
struct fdisk_context *cxt,
|
|
||||||
size_t i);
|
|
||||||
|
|
||||||
extern int fdisk_dos_move_begin(struct fdisk_context *cxt, size_t i);
|
|
||||||
|
|
||||||
#define DOS_FLAG_ACTIVE 1
|
|
||||||
|
|
||||||
/* script.c */
|
/* script.c */
|
||||||
struct fdisk_script *fdisk_new_script(struct fdisk_context *cxt);
|
struct fdisk_script *fdisk_new_script(struct fdisk_context *cxt);
|
||||||
|
|
Loading…
Reference in New Issue