]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: add docs for DOS functions
authorKarel Zak <kzak@redhat.com>
Wed, 26 Nov 2014 10:00:43 +0000 (11:00 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 26 Nov 2014 10:00:43 +0000 (11:00 +0100)
libfdisk/src/dos.c
libfdisk/src/fdiskP.h
libfdisk/src/libfdisk.h

index 30b37e67242d849e51ff778dbd55c513f135efe5..44459fa483acc9599fe7e15d8b9669d0bc4e9ff5 100644 (file)
 #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 \
@@ -2289,10 +2297,16 @@ struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt)
        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;
@@ -2306,6 +2320,12 @@ int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable)
        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;
index d9969c80c3d6f820121f33dd171540f5f813931e..85fd2cd8be9a7d95a12c4a26756fdac0c1ad6d21 100644 (file)
@@ -431,4 +431,9 @@ int fdisk_info_new_partition(
                        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 */
index 30e6b119a39d5a56126ec97f508e2956dc11a238..96be12805a5cdcf107c1b17a0dd4365f8819dec6 100644 (file)
@@ -359,6 +359,9 @@ extern int fdisk_iter_get_direction(struct fdisk_iter *itr);
 
 
 /* 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);
 
@@ -412,14 +415,6 @@ enum {
 
 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);