#define MAXIMUM_PARTS 60
#define ACTIVE_FLAG 0x80
+/**
+ * SECTION: dos
+ * @title: MBR (DOS) functions
+ * @short_description: MBR disk label specific functions
+ *
+ */
+
+
#define IS_EXTENDED(i) \
((i) == MBR_DOS_EXTENDED_PARTITION \
|| (i) == MBR_W95_EXTENDED_PARTITION \
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)
{
struct fdisk_dos_label *dos = (struct fdisk_dos_label *) lb;
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)
{
return ((struct fdisk_dos_label *) lb)->compatible;
int num, sector_t start, sector_t stop,
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 */
/* 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_is_compatible(struct fdisk_label *lb);
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 */
struct fdisk_script *fdisk_new_script(struct fdisk_context *cxt);