aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-06-19 18:15:33 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-06-19 18:15:33 +0200
commit015db5800ca7c6dd2d201eacb2951e72e6782b30 (patch)
tree0fe9b90c782f2ac831f30793e384b07bd690b3b3 /util-linux
parentce824aecf216536beed00d7817a614ffb8572239 (diff)
downloadbusybox-w32-015db5800ca7c6dd2d201eacb2951e72e6782b30.tar.gz
busybox-w32-015db5800ca7c6dd2d201eacb2951e72e6782b30.tar.bz2
busybox-w32-015db5800ca7c6dd2d201eacb2951e72e6782b30.zip
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fbset.c5
-rw-r--r--util-linux/fdisk_osf.c3
-rw-r--r--util-linux/fdisk_sgi.c27
3 files changed, 20 insertions, 15 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 09e96b763..b75ec1921 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -164,6 +164,7 @@ static const struct cmdoptions_t {
164 const unsigned char code; 164 const unsigned char code;
165} g_cmdoptions[] = { 165} g_cmdoptions[] = {
166 /*"12345678" + NUL */ 166 /*"12345678" + NUL */
167//TODO: convert to index_in_strings()
167 { "fb" , 1, CMD_FB }, 168 { "fb" , 1, CMD_FB },
168 { "db" , 1, CMD_DB }, 169 { "db" , 1, CMD_DB },
169 { "a" , 0, CMD_ALL }, 170 { "a" , 0, CMD_ALL },
@@ -416,7 +417,7 @@ int fbset_main(int argc, char **argv)
416 unsigned options = 0; 417 unsigned options = 0;
417 418
418 const char *fbdev = DEFAULTFBDEV; 419 const char *fbdev = DEFAULTFBDEV;
419 const char *modefile = DEFAULTFBMODE; 420 IF_FEATURE_FBSET_READMODE(const char *modefile = DEFAULTFBMODE;)
420 char *thisarg; 421 char *thisarg;
421 char *mode = mode; /* for compiler */ 422 char *mode = mode; /* for compiler */
422 423
@@ -444,7 +445,7 @@ int fbset_main(int argc, char **argv)
444 fbdev = argv[1]; 445 fbdev = argv[1];
445 break; 446 break;
446 case CMD_DB: 447 case CMD_DB:
447 modefile = argv[1]; 448 IF_FEATURE_FBSET_READMODE(modefile = argv[1];)
448 break; 449 break;
449 case CMD_ALL: 450 case CMD_ALL:
450 options |= OPT_ALL; 451 options |= OPT_ALL;
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index af04cfcc8..89f1f323c 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -366,10 +366,11 @@ bsd_select(void)
366 } 366 }
367 printf("Reading disklabel of %s at sector %u\n", 367 printf("Reading disklabel of %s at sector %u\n",
368 partname(disk_device, t+1, 0), ss + BSD_LABELSECTOR); 368 partname(disk_device, t+1, 0), ss + BSD_LABELSECTOR);
369 if (xbsd_readlabel(xbsd_part) == 0) 369 if (xbsd_readlabel(xbsd_part) == 0) {
370 if (xbsd_create_disklabel() == 0) 370 if (xbsd_create_disklabel() == 0)
371 return; 371 return;
372 break; 372 break;
373 }
373 } 374 }
374 } 375 }
375 376
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c
index 23ebc56ef..30def09c6 100644
--- a/util-linux/fdisk_sgi.c
+++ b/util-linux/fdisk_sgi.c
@@ -504,17 +504,19 @@ verify_sgi(int verbose)
504 if (sgi_get_sysid(Index[0]) == SGI_ENTIRE_DISK) { 504 if (sgi_get_sysid(Index[0]) == SGI_ENTIRE_DISK) {
505 if ((Index[0] != 10) && verbose) 505 if ((Index[0] != 10) && verbose)
506 printf("IRIX likes when Partition 11 covers the entire disk\n"); 506 printf("IRIX likes when Partition 11 covers the entire disk\n");
507 if ((sgi_get_start_sector(Index[0]) != 0) && verbose) 507 if ((sgi_get_start_sector(Index[0]) != 0) && verbose) {
508 printf("The entire disk partition should start " 508 printf("The entire disk partition should start "
509 "at block 0,\n" 509 "at block 0,\n"
510 "not at diskblock %u\n", 510 "not at diskblock %u\n",
511 sgi_get_start_sector(Index[0])); 511 sgi_get_start_sector(Index[0]));
512 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */ 512 }
513 if (SGI_DEBUG) { /* I do not understand how some disks fulfil it */
513 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose) 514 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose)
514 printf("The entire disk partition is only %u diskblock large,\n" 515 printf("The entire disk partition is only %u diskblock large,\n"
515 "but the disk is %u diskblocks long\n", 516 "but the disk is %u diskblocks long\n",
516 sgi_get_num_sectors(Index[0]), lastblock); 517 sgi_get_num_sectors(Index[0]), lastblock);
517 lastblock = sgi_get_num_sectors(Index[0]); 518 lastblock = sgi_get_num_sectors(Index[0]);
519 }
518 } else { 520 } else {
519 if (verbose) 521 if (verbose)
520 printf("One Partition (#11) should cover the entire disk\n"); 522 printf("One Partition (#11) should cover the entire disk\n");
@@ -669,16 +671,17 @@ sgi_set_volhdr(void)
669 int n; 671 int n;
670 672
671 for (n = 8; n < g_partitions; n++) { 673 for (n = 8; n < g_partitions; n++) {
672 if (!sgi_get_num_sectors(n)) { 674 if (!sgi_get_num_sectors(n)) {
673 /* 675 /*
674 * 5 cylinders is an arbitrary value I like 676 * 5 cylinders is an arbitrary value I like
675 * IRIX 5.3 stored files in the volume header 677 * IRIX 5.3 stored files in the volume header
676 * (like sash, symmon, fx, ide) with ca. 3200 678 * (like sash, symmon, fx, ide) with ca. 3200
677 * sectors. 679 * sectors.
678 */ 680 */
679 if (g_heads * g_sectors * 5 < sgi_get_lastblock()) 681 if (g_heads * g_sectors * 5 < sgi_get_lastblock()) {
680 sgi_set_partition(n, 0, g_heads * g_sectors * 5, SGI_VOLHDR); 682 sgi_set_partition(n, 0, g_heads * g_sectors * 5, SGI_VOLHDR);
681 break; 683 break;
684 }
682 } 685 }
683 } 686 }
684} 687}