]> git.pld-linux.org Git - packages/util-linux.git/blob - util-linux-fdisk-sunlabel.patch
- adapterized (avoid macros with /usr/include/{ncurses,freetype}*)
[packages/util-linux.git] / util-linux-fdisk-sunlabel.patch
1 --- fdisk/fdisksunlabel.c       2003-07-13 15:21:52.000000000 +0200
2 +++ fdisk/fdisksunlabel.c       2004-12-22 16:36:24.000000000 +0100
3 @@ -379,8 +379,8 @@
4         }
5  
6         set_all_unchanged();
7 -       set_changed(0);
8         get_boot(create_empty_sun);
9 +       set_changed(0);
10  }
11  
12  void
13 @@ -524,9 +524,14 @@
14                                          scround(stop), 0, mesg);
15                 if (display_in_cyl_units)
16                         first *= units_per_sector;
17 -               else
18 +               else {
19                         /* Starting sector has to be properly aligned */
20 -                       first = (first + heads * sectors - 1) / (heads * sectors);
21 +                       int cs = heads * sectors;
22 +                       int x = first % cs;
23 +
24 +                       if (x)
25 +                               first += cs - x;
26 +               }
27                 if (n == 2 && first != 0)
28                         printf ("\
29  It is highly recommended that the third partition covers the whole disk\n\
30 @@ -560,7 +565,7 @@
31                 } else
32                         break;
33         }
34 -       stop = cylinders * heads * sectors;
35 +       stop = cylinders * heads * sectors;     /* ancient */
36         stop2 = stop;
37         for (i = 0; i < partitions; i++) {
38                 if (starts[i] > first && starts[i] < stop)
This page took 0.125573 seconds and 3 git commands to generate.