aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-07 01:31:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-07 01:31:14 +0100
commit245a4f84be09505fcac7b2afab00106d65c815df (patch)
tree6d0685158588e69744ec2539d13e2526117da366 /util-linux
parent0d8c0b810e02de887abc3a0fbbf6e7d06ace8a85 (diff)
downloadbusybox-w32-245a4f84be09505fcac7b2afab00106d65c815df.tar.gz
busybox-w32-245a4f84be09505fcac7b2afab00106d65c815df.tar.bz2
busybox-w32-245a4f84be09505fcac7b2afab00106d65c815df.zip
big endian warning fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk_osf.c5
-rw-r--r--util-linux/mkfs_vfat.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 09a68da83..b89a2b2af 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -615,7 +615,7 @@ xbsd_create_disklabel(void)
615 615
616 while (1) { 616 while (1) {
617 c = read_nonempty("Do you want to create a disklabel? (y/n) "); 617 c = read_nonempty("Do you want to create a disklabel? (y/n) ");
618 if (c == 'y' || c == 'Y') { 618 if ((c|0x20) == 'y') {
619 if (xbsd_initlabel( 619 if (xbsd_initlabel(
620#if defined(__alpha__) || defined(__powerpc__) || defined(__hppa__) || \ 620#if defined(__alpha__) || defined(__powerpc__) || defined(__hppa__) || \
621 defined(__s390__) || defined(__s390x__) 621 defined(__s390__) || defined(__s390x__)
@@ -629,7 +629,7 @@ xbsd_create_disklabel(void)
629 } 629 }
630 return 0; 630 return 0;
631 } 631 }
632 if (c == 'n') 632 if ((c|0x20) == 'n')
633 return 0; 633 return 0;
634 } 634 }
635} 635}
@@ -964,6 +964,7 @@ xbsd_writelabel(struct partition *p)
964#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__hppa__) 964#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__hppa__)
965 sector = get_start_sect(p) + BSD_LABELSECTOR; 965 sector = get_start_sect(p) + BSD_LABELSECTOR;
966#else 966#else
967 (void)p; /* silence warning */
967 sector = BSD_LABELSECTOR; 968 sector = BSD_LABELSECTOR;
968#endif 969#endif
969 970
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index de88a7443..e794b3145 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -471,7 +471,8 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
471 strcpy(boot_blk->boot_jump, "\xeb\x58\x90" "mkdosfs"); // system_id[8] included :) 471 strcpy(boot_blk->boot_jump, "\xeb\x58\x90" "mkdosfs"); // system_id[8] included :)
472 STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect); 472 STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect);
473 STORE_LE(boot_blk->sect_per_clust, sect_per_clust); 473 STORE_LE(boot_blk->sect_per_clust, sect_per_clust);
474 STORE_LE(boot_blk->reserved_sect, reserved_sect); 474 // cast in needed on big endian to suppress a warning
475 STORE_LE(boot_blk->reserved_sect, (uint16_t)reserved_sect);
475 STORE_LE(boot_blk->fats, 2); 476 STORE_LE(boot_blk->fats, 2);
476 //STORE_LE(boot_blk->dir_entries, 0); // for FAT32, stays 0 477 //STORE_LE(boot_blk->dir_entries, 0); // for FAT32, stays 0
477 if (volume_size_sect <= 0xffff) 478 if (volume_size_sect <= 0xffff)