2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.c
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.c
|
|
|
|
@@ -63,7 +63,7 @@ static void delete_partition(int i);
|
2006-12-19 00:18:10 +01:00
|
|
|
|
|
|
|
/* A valid partition table sector ends in 0x55 0xaa */
|
|
|
|
static unsigned int
|
|
|
|
-part_table_flag(char *b) {
|
|
|
|
+part_table_flag(unsigned char *b) {
|
|
|
|
return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8);
|
|
|
|
}
|
|
|
|
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -73,7 +73,7 @@ valid_part_table_flag(unsigned char *b)
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-write_part_table_flag(char *b) {
|
|
|
|
+write_part_table_flag(unsigned char *b) {
|
|
|
|
b[510] = 0x55;
|
|
|
|
b[511] = 0xaa;
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -100,17 +100,17 @@ set_start_sect(struct partition *p, unsi
|
2006-12-19 00:18:10 +01:00
|
|
|
store4_little_endian(p->start4, start_sect);
|
|
|
|
}
|
|
|
|
|
|
|
|
-unsigned int
|
|
|
|
+unsigned long long
|
|
|
|
get_start_sect(struct partition *p) {
|
|
|
|
return read4_little_endian(p->start4);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-set_nr_sects(struct partition *p, unsigned int nr_sects) {
|
|
|
|
+set_nr_sects(struct partition *p, unsigned long long nr_sects) {
|
|
|
|
store4_little_endian(p->size4, nr_sects);
|
|
|
|
}
|
|
|
|
|
|
|
|
-unsigned int
|
|
|
|
+unsigned long long
|
|
|
|
get_nr_sects(struct partition *p) {
|
|
|
|
return read4_little_endian(p->size4);
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -122,7 +122,7 @@ static int type_open = O_RDWR;
|
2006-12-19 00:18:10 +01:00
|
|
|
* Raw disk label. For DOS-type partition tables the MBR,
|
|
|
|
* with descriptions of the primary partitions.
|
|
|
|
*/
|
|
|
|
-char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
+unsigned char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* per partition table entry data
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -136,8 +136,8 @@ struct pte {
|
2006-12-19 00:18:10 +01:00
|
|
|
struct partition *part_table; /* points into sectorbuffer */
|
|
|
|
struct partition *ext_pointer; /* points into sectorbuffer */
|
|
|
|
char changed; /* boolean */
|
|
|
|
- unsigned int offset; /* disk sector number */
|
|
|
|
- char *sectorbuffer; /* disk sector contents */
|
|
|
|
+ unsigned long long offset; /* disk sector number */
|
|
|
|
+ unsigned char *sectorbuffer; /* disk sector contents */
|
|
|
|
} ptes[MAXIMUM_PARTS];
|
|
|
|
|
|
|
|
char *disk_device, /* must be specified */
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -156,15 +156,14 @@ unsigned int user_cylinders, user_heads,
|
2006-12-19 00:18:10 +01:00
|
|
|
unsigned int pt_heads, pt_sectors;
|
|
|
|
unsigned int kern_heads, kern_sectors;
|
|
|
|
|
|
|
|
+unsigned long long sector_offset = 1, extended_offset = 0, sectors;
|
|
|
|
+
|
|
|
|
unsigned int heads,
|
|
|
|
- sectors,
|
|
|
|
cylinders,
|
|
|
|
sector_size = DEFAULT_SECTOR_SIZE,
|
|
|
|
user_set_sector_size = 0,
|
|
|
|
- sector_offset = 1,
|
|
|
|
units_per_sector = 1,
|
|
|
|
- display_in_cyl_units = 1,
|
|
|
|
- extended_offset = 0; /* offset of link pointers */
|
|
|
|
+ display_in_cyl_units = 1;
|
|
|
|
|
|
|
|
unsigned long long total_number_of_sectors;
|
|
|
|
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -242,21 +241,21 @@ void fatal(enum failure why) {
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-seek_sector(int fd, unsigned int secno) {
|
|
|
|
+seek_sector(int fd, unsigned long long secno) {
|
2007-04-12 18:31:42 +02:00
|
|
|
off_t offset = (off_t) secno * sector_size;
|
|
|
|
if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
2006-12-19 00:18:10 +01:00
|
|
|
fatal(unable_to_seek);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-read_sector(int fd, unsigned int secno, char *buf) {
|
|
|
|
+read_sector(int fd, unsigned long long secno, unsigned char *buf) {
|
|
|
|
seek_sector(fd, secno);
|
|
|
|
if (read(fd, buf, sector_size) != sector_size)
|
|
|
|
fatal(unable_to_read);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-write_sector(int fd, unsigned int secno, char *buf) {
|
|
|
|
+write_sector(int fd, unsigned long long secno, unsigned char *buf) {
|
|
|
|
seek_sector(fd, secno);
|
|
|
|
if (write(fd, buf, sector_size) != sector_size)
|
|
|
|
fatal(unable_to_write);
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -264,11 +263,11 @@ write_sector(int fd, unsigned int secno,
|
2006-12-19 00:18:10 +01:00
|
|
|
|
|
|
|
/* Allocate a buffer and read a partition table sector */
|
|
|
|
static void
|
|
|
|
-read_pte(int fd, int pno, unsigned int offset) {
|
|
|
|
+read_pte(int fd, int pno, unsigned long long offset) {
|
|
|
|
struct pte *pe = &ptes[pno];
|
|
|
|
|
|
|
|
pe->offset = offset;
|
|
|
|
- pe->sectorbuffer = (char *) malloc(sector_size);
|
|
|
|
+ pe->sectorbuffer = malloc(sector_size);
|
|
|
|
if (!pe->sectorbuffer)
|
|
|
|
fatal(out_of_memory);
|
|
|
|
read_sector(fd, offset, pe->sectorbuffer);
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -276,7 +275,7 @@ read_pte(int fd, int pno, unsigned int o
|
2006-12-19 00:18:10 +01:00
|
|
|
pe->part_table = pe->ext_pointer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
-static unsigned int
|
|
|
|
+static unsigned long long
|
|
|
|
get_partition_start(struct pte *pe) {
|
|
|
|
return pe->offset + get_start_sect(pe->part_table);
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -549,10 +548,10 @@ clear_partition(struct partition *p) {
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-set_partition(int i, int doext, unsigned int start, unsigned int stop,
|
|
|
|
- int sysid) {
|
|
|
|
+set_partition(int i, int doext, unsigned long long start,
|
|
|
|
+ unsigned long long stop, int sysid) {
|
|
|
|
struct partition *p;
|
|
|
|
- unsigned int offset;
|
|
|
|
+ unsigned long long offset;
|
|
|
|
|
|
|
|
if (doext) {
|
|
|
|
p = ptes[i].ext_pointer;
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1548,7 +1547,7 @@ list_disk_geometry(void) {
|
2006-12-19 00:18:10 +01:00
|
|
|
else
|
|
|
|
printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"),
|
|
|
|
disk_device, megabytes/1000, (megabytes/100)%10, bytes);
|
|
|
|
- printf(_("%d heads, %d sectors/track, %d cylinders"),
|
|
|
|
+ printf(_("%d heads, %Ld sectors/track, %d cylinders"),
|
|
|
|
heads, sectors, cylinders);
|
|
|
|
if (units_per_sector == 1)
|
|
|
|
printf(_(", total %llu sectors"),
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1780,20 +1779,21 @@ x_list_table(int extend) {
|
2006-12-19 00:18:10 +01:00
|
|
|
struct partition *p;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
- printf(_("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n"),
|
|
|
|
+ printf(_("\nDisk %s: %d heads, %Ld sectors, %d cylinders\n\n"),
|
|
|
|
disk_device, heads, sectors, cylinders);
|
|
|
|
printf(_("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n"));
|
|
|
|
for (i = 0 ; i < partitions; i++) {
|
|
|
|
pe = &ptes[i];
|
|
|
|
p = (extend ? pe->ext_pointer : pe->part_table);
|
|
|
|
if (p != NULL) {
|
|
|
|
- printf("%2d %02x%4d%4d%5d%4d%4d%5d%11u%11u %02x\n",
|
|
|
|
+ printf("%2d %02x%4d%4d%5d%4d%4d%5d%11lu%11lu %02x\n",
|
|
|
|
i + 1, p->boot_ind, p->head,
|
|
|
|
sector(p->sector),
|
|
|
|
cylinder(p->sector, p->cyl), p->end_head,
|
|
|
|
sector(p->end_sector),
|
|
|
|
cylinder(p->end_sector, p->end_cyl),
|
|
|
|
- get_start_sect(p), get_nr_sects(p), p->sys_ind);
|
|
|
|
+ (unsigned long) get_start_sect(p),
|
|
|
|
+ (unsigned long) get_nr_sects(p), p->sys_ind);
|
|
|
|
if (p->sys_ind)
|
|
|
|
check_consistency(p, i);
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1801,7 +1801,7 @@ x_list_table(int extend) {
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
-fill_bounds(unsigned int *first, unsigned int *last) {
|
|
|
|
+fill_bounds(unsigned long long *first, unsigned long long *last) {
|
|
|
|
int i;
|
|
|
|
struct pte *pe = &ptes[0];
|
|
|
|
struct partition *p;
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1834,7 +1834,7 @@ check(int n, unsigned int h, unsigned in
|
2006-12-19 00:18:10 +01:00
|
|
|
n, h + 1, heads);
|
|
|
|
if (real_s >= sectors)
|
|
|
|
fprintf(stderr, _("Partition %d: sector %d greater than "
|
|
|
|
- "maximum %d\n"), n, s, sectors);
|
|
|
|
+ "maximum %Ld\n"), n, s, sectors);
|
|
|
|
if (real_c >= cylinders)
|
|
|
|
fprintf(stderr, _("Partitions %d: cylinder %d greater than "
|
|
|
|
"maximum %d\n"), n, real_c + 1, cylinders);
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1847,8 +1847,8 @@ check(int n, unsigned int h, unsigned in
|
2006-12-19 00:18:10 +01:00
|
|
|
static void
|
|
|
|
verify(void) {
|
|
|
|
int i, j;
|
|
|
|
- unsigned int total = 1;
|
|
|
|
- unsigned int first[partitions], last[partitions];
|
|
|
|
+ unsigned long total = 1;
|
|
|
|
+ unsigned long long first[partitions], last[partitions];
|
|
|
|
struct partition *p;
|
|
|
|
|
|
|
|
if (warn_geometry())
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1892,7 +1892,7 @@ verify(void) {
|
2006-12-19 00:18:10 +01:00
|
|
|
|
|
|
|
if (extended_offset) {
|
|
|
|
struct pte *pex = &ptes[ext_index];
|
|
|
|
- unsigned int e_last = get_start_sect(pex->part_table) +
|
|
|
|
+ unsigned long long e_last = get_start_sect(pex->part_table) +
|
|
|
|
get_nr_sects(pex->part_table) - 1;
|
|
|
|
|
|
|
|
for (i = 4; i < partitions; i++) {
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1911,8 +1911,8 @@ verify(void) {
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (total > total_number_of_sectors)
|
|
|
|
- printf(_("Total allocated sectors %d greater than the maximum "
|
|
|
|
- "%lld\n"), total, total_number_of_sectors);
|
|
|
|
+ printf(_("Total allocated sectors %ld greater than the maximum"
|
|
|
|
+ " %lld\n"), total, total_number_of_sectors);
|
|
|
|
else if (total < total_number_of_sectors)
|
|
|
|
printf(_("%lld unallocated sectors\n"),
|
|
|
|
total_number_of_sectors - total);
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1925,7 +1925,7 @@ add_partition(int n, int sys) {
|
2006-12-19 00:18:10 +01:00
|
|
|
struct partition *p = ptes[n].part_table;
|
|
|
|
struct partition *q = ptes[ext_index].part_table;
|
|
|
|
long long llimit;
|
|
|
|
- unsigned int start, stop = 0, limit, temp,
|
|
|
|
+ unsigned long long start, stop = 0, limit, temp,
|
|
|
|
first[partitions], last[partitions];
|
|
|
|
|
|
|
|
if (p && p->sys_ind) {
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -1971,7 +1971,7 @@ add_partition(int n, int sys) {
|
2006-12-19 00:18:10 +01:00
|
|
|
if (start > limit)
|
|
|
|
break;
|
|
|
|
if (start >= temp+units_per_sector && read) {
|
|
|
|
- printf(_("Sector %d is already allocated\n"), temp);
|
|
|
|
+ printf(_("Sector %llu is already allocated\n"), temp);
|
|
|
|
temp = start;
|
|
|
|
read = 0;
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -2230,14 +2230,14 @@ reread_partition_table(int leave) {
|
2006-12-19 00:18:10 +01:00
|
|
|
|
|
|
|
#define MAX_PER_LINE 16
|
|
|
|
static void
|
|
|
|
-print_buffer(char pbuffer[]) {
|
|
|
|
+print_buffer(unsigned char pbuffer[]) {
|
|
|
|
int i,
|
|
|
|
l;
|
|
|
|
|
|
|
|
for (i = 0, l = 0; i < sector_size; i++, l++) {
|
|
|
|
if (l == 0)
|
|
|
|
printf("0x%03X:", i);
|
|
|
|
- printf(" %02X", (unsigned char) pbuffer[i]);
|
|
|
|
+ printf(" %02X", pbuffer[i]);
|
|
|
|
if (l == MAX_PER_LINE - 1) {
|
|
|
|
printf("\n");
|
|
|
|
l = -1;
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisk.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisk.h
|
|
|
|
@@ -81,8 +81,8 @@ extern unsigned int read_int(unsigned in
|
2006-12-19 00:18:10 +01:00
|
|
|
#define SINGULAR 1
|
|
|
|
extern char *const str_units(int);
|
|
|
|
|
|
|
|
-extern unsigned int get_start_sect(struct partition *p);
|
|
|
|
-extern unsigned int get_nr_sects(struct partition *p);
|
|
|
|
+extern unsigned long long get_start_sect(struct partition *p);
|
|
|
|
+extern unsigned long long get_nr_sects(struct partition *p);
|
|
|
|
|
|
|
|
extern int osf_label;
|
|
|
|
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskaixlabel.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskaixlabel.h
|
|
|
|
@@ -19,9 +19,10 @@ typedef struct {
|
2006-12-19 00:18:10 +01:00
|
|
|
|
|
|
|
/* fdisk.c */
|
|
|
|
#define aixlabel ((aix_partition *)MBRbuffer)
|
|
|
|
-extern char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
extern char changed[MAXIMUM_PARTS];
|
|
|
|
-extern unsigned int heads, sectors, cylinders;
|
|
|
|
+extern unsigned int heads, cylinders;
|
|
|
|
+extern unsigned long long sectors;
|
|
|
|
extern int show_begin;
|
|
|
|
extern int aix_label;
|
|
|
|
extern char *partition_type(unsigned char type);
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdiskmaclabel.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdiskmaclabel.h
|
|
|
|
@@ -25,9 +25,10 @@ typedef struct {
|
|
|
|
|
2006-12-19 00:18:10 +01:00
|
|
|
/* fdisk.c */
|
|
|
|
#define maclabel ((mac_partition *)MBRbuffer)
|
|
|
|
-extern char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
extern char changed[MAXIMUM_PARTS];
|
|
|
|
-extern unsigned int heads, sectors, cylinders;
|
|
|
|
+extern unsigned int heads, cylinders;
|
|
|
|
+extern unsigned long long sectors;
|
|
|
|
extern int show_begin;
|
|
|
|
extern int mac_label;
|
|
|
|
extern char *partition_type(unsigned char type);
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.c
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.c
|
|
|
|
@@ -197,7 +197,7 @@ sgi_list_table(int xtra) {
|
2006-12-19 00:18:10 +01:00
|
|
|
w = strlen(disk_device);
|
|
|
|
|
|
|
|
if (xtra) {
|
|
|
|
- printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n"
|
|
|
|
+ printf(_("\nDisk %s (SGI disk label): %d heads, %llu sectors\n"
|
|
|
|
"%d cylinders, %d physical cylinders\n"
|
|
|
|
"%d extra sects/cyl, interleave %d:1\n"
|
|
|
|
"%s\n"
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -211,7 +211,7 @@ sgi_list_table(int xtra) {
|
2006-12-19 00:18:10 +01:00
|
|
|
sector_size);
|
|
|
|
} else {
|
|
|
|
printf(_("\nDisk %s (SGI disk label): "
|
|
|
|
- "%d heads, %d sectors, %d cylinders\n"
|
|
|
|
+ "%d heads, %llu sectors, %d cylinders\n"
|
|
|
|
"Units = %s of %d * %d bytes\n\n"),
|
|
|
|
disk_device, heads, sectors, cylinders,
|
|
|
|
str_units(PLURAL), units_per_sector,
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksgilabel.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksgilabel.h
|
|
|
|
@@ -103,8 +103,9 @@ typedef struct {
|
2006-12-19 00:18:10 +01:00
|
|
|
/* fdisk.c */
|
|
|
|
#define sgilabel ((sgi_partition *)MBRbuffer)
|
|
|
|
#define sgiparam (sgilabel->devparam)
|
|
|
|
-extern char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
-extern unsigned int heads, sectors, cylinders, sector_size;
|
|
|
|
+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
+extern unsigned int heads, cylinders, sector_size;
|
|
|
|
+extern unsigned long long sectors;
|
|
|
|
extern int show_begin;
|
|
|
|
extern int sgi_label;
|
|
|
|
extern char *partition_type(unsigned char type);
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.c
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.c
|
|
|
|
@@ -348,7 +348,7 @@ void create_sunlabel(void)
|
2006-12-19 00:18:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
snprintf(sunlabel->info, sizeof(sunlabel->info),
|
|
|
|
- "%s%s%s cyl %d alt %d hd %d sec %d",
|
|
|
|
+ "%s%s%s cyl %d alt %d hd %d sec %llu",
|
|
|
|
p ? p->vendor : "", (p && *p->vendor) ? " " : "",
|
|
|
|
p ? p->model
|
|
|
|
: (floppy ? _("3,5\" floppy") : _("Linux custom")),
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -655,7 +655,7 @@ sun_list_table(int xtra) {
|
2006-12-19 00:18:10 +01:00
|
|
|
w = strlen(disk_device);
|
|
|
|
if (xtra)
|
|
|
|
printf(
|
|
|
|
- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d rpm\n"
|
|
|
|
+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d rpm\n"
|
|
|
|
"%d cylinders, %d alternate cylinders, %d physical cylinders\n"
|
|
|
|
"%d extra sects/cyl, interleave %d:1\n"
|
|
|
|
"%s\n"
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -669,7 +669,7 @@ sun_list_table(int xtra) {
|
2006-12-19 00:18:10 +01:00
|
|
|
str_units(PLURAL), units_per_sector);
|
|
|
|
else
|
|
|
|
printf(
|
|
|
|
- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n"
|
|
|
|
+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d cylinders\n"
|
|
|
|
"Units = %s of %d * 512 bytes\n\n"),
|
|
|
|
disk_device, heads, sectors, cylinders,
|
|
|
|
str_units(PLURAL), units_per_sector);
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/fdisk/fdisksunlabel.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/fdisk/fdisksunlabel.h
|
|
|
|
@@ -37,8 +37,9 @@ typedef struct {
|
2006-12-19 00:18:10 +01:00
|
|
|
: (__u32)(x))
|
|
|
|
|
|
|
|
/* fdisk.c */
|
|
|
|
-extern char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
-extern unsigned int heads, sectors, cylinders;
|
|
|
|
+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE];
|
|
|
|
+extern unsigned int heads, cylinders;
|
|
|
|
+extern unsigned long long sectors;
|
|
|
|
extern int show_begin;
|
|
|
|
extern int sun_label;
|
|
|
|
extern char *partition_type(unsigned char type);
|