summaryrefslogtreecommitdiff
path: root/util-linux/fdisk_sgi.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-16 13:18:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-16 13:18:17 +0000
commit284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch)
tree3cfcea06c5a5c9e454edd39b58111ef38810882c /util-linux/fdisk_sgi.c
parent069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff)
downloadbusybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz
busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.bz2
busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip
random s/short/int/
add_cmd 1189 1190 +1 xconnect_ftpdata 118 117 -1 data_align 86 84 -2 process_files 2101 2096 -5 forkexec 1345 1334 -11
Diffstat (limited to 'util-linux/fdisk_sgi.c')
-rw-r--r--util-linux/fdisk_sgi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c
index f0bd195a1..7826bb7cc 100644
--- a/util-linux/fdisk_sgi.c
+++ b/util-linux/fdisk_sgi.c
@@ -1,5 +1,7 @@
1#if ENABLE_FEATURE_SGI_LABEL 1#if ENABLE_FEATURE_SGI_LABEL
2 2
3#define SGI_DEBUG 0
4
3/* 5/*
4 * Copyright (C) Andreas Neuper, Sep 1998. 6 * Copyright (C) Andreas Neuper, Sep 1998.
5 * This file may be modified and redistributed under 7 * This file may be modified and redistributed under
@@ -117,9 +119,8 @@ typedef struct {
117 */ 119 */
118 120
119 121
120static int sgi_other_endian; 122static smallint sgi_other_endian; /* bool */
121static int debug; 123static smallint sgi_volumes = 1; /* max 15 */
122static short sgi_volumes = 1;
123 124
124/* 125/*
125 * only dealing with free blocks here 126 * only dealing with free blocks here
@@ -318,7 +319,7 @@ sgi_list_table(int xtra)
318 "Pt# %*s Info Start End Sectors Id System\n", 319 "Pt# %*s Info Start End Sectors Id System\n",
319 w + 2, "Device"); 320 w + 2, "Device");
320 for (i = 0; i < g_partitions; i++) { 321 for (i = 0; i < g_partitions; i++) {
321 if (sgi_get_num_sectors(i) || debug ) { 322 if (sgi_get_num_sectors(i) || SGI_DEBUG) {
322 uint32_t start = sgi_get_start_sector(i); 323 uint32_t start = sgi_get_start_sector(i);
323 uint32_t len = sgi_get_num_sectors(i); 324 uint32_t len = sgi_get_num_sectors(i);
324 kpi++; /* only count nonempty partitions */ 325 kpi++; /* only count nonempty partitions */
@@ -514,7 +515,7 @@ verify_sgi(int verbose)
514 "at block 0,\n" 515 "at block 0,\n"
515 "not at diskblock %d\n", 516 "not at diskblock %d\n",
516 sgi_get_start_sector(Index[0])); 517 sgi_get_start_sector(Index[0]));
517 if (debug) /* I do not understand how some disks fulfil it */ 518 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
518 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose) 519 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose)
519 printf("The entire disk partition is only %d diskblock large,\n" 520 printf("The entire disk partition is only %d diskblock large,\n"
520 "but the disk is %d diskblocks long\n", 521 "but the disk is %d diskblocks long\n",
@@ -523,7 +524,7 @@ verify_sgi(int verbose)
523 } else { 524 } else {
524 if (verbose) 525 if (verbose)
525 printf("One Partition (#11) should cover the entire disk\n"); 526 printf("One Partition (#11) should cover the entire disk\n");
526 if (debug > 2) 527 if (SGI_DEBUG > 2)
527 printf("sysid=%d\tpartition=%d\n", 528 printf("sysid=%d\tpartition=%d\n",
528 sgi_get_sysid(Index[0]), Index[0]+1); 529 sgi_get_sysid(Index[0]), Index[0]+1);
529 } 530 }
@@ -531,13 +532,13 @@ verify_sgi(int verbose)
531 int cylsize = sgi_get_nsect() * sgi_get_ntrks(); 532 int cylsize = sgi_get_nsect() * sgi_get_ntrks();
532 533
533 if ((sgi_get_start_sector(Index[i]) % cylsize) != 0) { 534 if ((sgi_get_start_sector(Index[i]) % cylsize) != 0) {
534 if (debug) /* I do not understand how some disks fulfil it */ 535 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
535 if (verbose) 536 if (verbose)
536 printf("Partition %d does not start on cylinder boundary\n", 537 printf("Partition %d does not start on cylinder boundary\n",
537 Index[i]+1); 538 Index[i]+1);
538 } 539 }
539 if (sgi_get_num_sectors(Index[i]) % cylsize != 0) { 540 if (sgi_get_num_sectors(Index[i]) % cylsize != 0) {
540 if (debug) /* I do not understand how some disks fulfil it */ 541 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
541 if (verbose) 542 if (verbose)
542 printf("Partition %d does not end on cylinder boundary\n", 543 printf("Partition %d does not end on cylinder boundary\n",
543 Index[i]+1); 544 Index[i]+1);
@@ -562,7 +563,7 @@ verify_sgi(int verbose)
562 } 563 }
563 start = sgi_get_start_sector(Index[i]) 564 start = sgi_get_start_sector(Index[i])
564 + sgi_get_num_sectors(Index[i]); 565 + sgi_get_num_sectors(Index[i]);
565 if (debug > 1) { 566 if (SGI_DEBUG > 1) {
566 if (verbose) 567 if (verbose)
567 printf("%2d:%12d\t%12d\t%12d\n", Index[i], 568 printf("%2d:%12d\t%12d\t%12d\n", Index[i],
568 sgi_get_start_sector(Index[i]), 569 sgi_get_start_sector(Index[i]),
@@ -805,7 +806,7 @@ create_sgilabel(void)
805 old[i].start = get_start_sect(get_part_table(i)); 806 old[i].start = get_start_sect(get_part_table(i));
806 old[i].nsect = get_nr_sects(get_part_table(i)); 807 old[i].nsect = get_nr_sects(get_part_table(i));
807 printf("Trying to keep parameters of partition %d\n", i); 808 printf("Trying to keep parameters of partition %d\n", i);
808 if (debug) 809 if (SGI_DEBUG)
809 printf("ID=%02x\tSTART=%d\tLENGTH=%d\n", 810 printf("ID=%02x\tSTART=%d\tLENGTH=%d\n",
810 old[i].sysid, old[i].start, old[i].nsect); 811 old[i].sysid, old[i].start, old[i].nsect);
811 } 812 }