]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (dos) move dos specific code
authorKarel Zak <kzak@redhat.com>
Mon, 21 Jan 2013 11:28:27 +0000 (12:28 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 11:47:31 +0000 (12:47 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.c
fdisks/fdisk.h
fdisks/fdiskdoslabel.c

index d7a7d0050a2e79c4dd3ad5ea7c96a4f32d2a1646..18990f72ad8012d61fa92e82cf97d9ccf3f9e185 100644 (file)
@@ -745,24 +745,6 @@ static void list_table(struct fdisk_context *cxt, int xtra)
                dos_list_table(cxt, xtra);
 }
 
-void fill_bounds(sector_t *first, sector_t *last)
-{
-       int i;
-       struct pte *pe = &ptes[0];
-       struct partition *p;
-
-       for (i = 0; i < partitions; pe++,i++) {
-               p = pe->part_table;
-               if (!p->sys_ind || IS_EXTENDED (p->sys_ind)) {
-                       first[i] = 0xffffffff;
-                       last[i] = 0;
-               } else {
-                       first[i] = get_partition_start(pe);
-                       last[i] = first[i] + get_nr_sects(p) - 1;
-               }
-       }
-}
-
 static void verify(struct fdisk_context *cxt)
 {
        if (warn_geometry(cxt))
index 9b85b6484e2f77d307f1f69fe69b7dbacd48c8ee..54f91a1ae0a1c8d797274306046179abe3797682 100644 (file)
@@ -79,8 +79,6 @@ extern unsigned int read_int(struct fdisk_context *cxt,
 extern void print_menu(struct fdisk_context *cxt, enum menutype menu);
 extern void print_partition_size(struct fdisk_context *cxt, int num, sector_t start, sector_t stop, int sysid);
 
-extern void fill_bounds(sector_t *first, sector_t *last);
-
 extern char *partition_type(struct fdisk_context *cxt, unsigned char type);
 extern char read_chars(struct fdisk_context *cxt, char *mesg);
 extern int warn_geometry(struct fdisk_context *cxt);
index e44c444236be643c49d43b9b84b34b934694b6e8..55b28c2036477eda092ee8aafcc56043155aa8cd 100644 (file)
@@ -564,6 +564,24 @@ static sector_t get_unused_start(struct fdisk_context *cxt,
        return start;
 }
 
+static void fill_bounds(sector_t *first, sector_t *last)
+{
+       int i;
+       struct pte *pe = &ptes[0];
+       struct partition *p;
+
+       for (i = 0; i < partitions; pe++,i++) {
+               p = pe->part_table;
+               if (!p->sys_ind || IS_EXTENDED (p->sys_ind)) {
+                       first[i] = 0xffffffff;
+                       last[i] = 0;
+               } else {
+                       first[i] = get_partition_start(pe);
+                       last[i] = first[i] + get_nr_sects(p) - 1;
+               }
+       }
+}
+
 static int add_partition(struct fdisk_context *cxt, int n, struct fdisk_parttype *t)
 {
        char mesg[256];         /* 48 does not suffice in Japanese */