summaryrefslogtreecommitdiff
path: root/util-linux/fdisk_aix.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-09-16 03:03:13 +0200
committerDenys Vlasenko2009-09-16 03:03:13 +0200
commitddf7850f2b775c2148f76cd7e839b8a6e667de8e (patch)
tree7f70a23e698c6a1ddb04416259c65450fbc0d522 /util-linux/fdisk_aix.c
parent8dc0e1929e3af3b1673e5a8e486808386400c020 (diff)
downloadbusybox-ddf7850f2b775c2148f76cd7e839b8a6e667de8e.zip
busybox-ddf7850f2b775c2148f76cd7e839b8a6e667de8e.tar.gz
fdisk: add a warning and truncate disks with >= 2^32 sectors
As a result, for sectors we can use uint32_t instead of long long, and on 32 bits it has drastic effects: function old new delta get_geometry 619 646 +27 set_sun_partition 148 150 +2 get_partition 134 135 +1 xbsd_write_bootstrap 382 381 -1 xbsd_readlabel 247 246 -1 bsd_select 1674 1672 -2 sun_other_endian 4 1 -3 scsi_disk 4 1 -3 floppy 4 1 -3 fdisk_main 3735 3732 -3 read_maybe_empty 43 37 -6 create_doslabel 111 104 -7 read_line 97 88 -9 add_logical 117 107 -10 write_table 599 588 -11 new_partition 1684 1670 -14 list_disk_geometry 229 215 -14 wrong_p_order 130 110 -20 xselect 3142 3114 -28 seek_sector 71 40 -31 get_boot 1576 1533 -43 fill_bounds 174 128 -46 delete_partition 603 551 -52 list_table 1401 1232 -169 set_partition 459 286 -173 verify 1840 1495 -345 add_partition 2486 1270 -1216 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/24 up/down: 30/-2210) Total: -2180 bytes text data bss dec hex filename 848812 460 7116 856388 d1144 busybox_old 846620 460 7108 854188 d08ac busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/fdisk_aix.c')
-rw-r--r--util-linux/fdisk_aix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/fdisk_aix.c b/util-linux/fdisk_aix.c
index 2c0d2a6..2a0ab17 100644
--- a/util-linux/fdisk_aix.c
+++ b/util-linux/fdisk_aix.c
@@ -54,8 +54,9 @@ aix_info(void)
static int
check_aix_label(void)
{
- if (aixlabel->magic != AIX_LABEL_MAGIC &&
- aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED) {
+ if (aixlabel->magic != AIX_LABEL_MAGIC
+ && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED
+ ) {
current_label_type = 0;
aix_other_endian = 0;
return 0;