aboutsummaryrefslogtreecommitdiff
path: root/util-linux/fdisk_gpt.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: implement -t PARTTYPEDenys Vlasenko2026-02-151-6/+10
| | | | | | | | | | | | | | This allows to operate on MBR even if disk also has GPT. function old new delta .rodata 107019 107074 +55 packed_usage 36009 36034 +25 get_boot 1513 1532 +19 fdisk_main 4618 4622 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 103/0) Total: 103 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: code shrinkDenys Vlasenko2026-02-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | function old new delta new_partition 1054 1066 +12 list_table 1366 1370 +4 update_units 32 35 +3 list_disk_geometry 68 71 +3 get_geometry 535 538 +3 fdisk_fatal 38 41 +3 warn_cylinders 42 44 +2 xbsd_print_disklabel 836 834 -2 create_doslabel 110 108 -2 change_units 49 45 -4 xbsd_new_part 477 456 -21 add_partition 1278 1246 -32 .rodata 107059 107008 -51 fdisk_main 4775 4618 -157 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/7 up/down: 30/-269) Total: -239 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: several fixes for 4K sector sizeDenys Vlasenko2026-02-041-13/+5
| | | | | | | | | | | | | | | | | function old new delta bb_getsize_in_512sect - 187 +187 list_disk_name_and_sizes - 80 +80 get_geometry 511 535 +24 .rodata 107066 107088 +22 msg_building_new_label 143 142 -1 fdisk_main 4781 4775 -6 list_table 1423 1366 -57 list_disk_geometry 143 68 -75 bb_BLKGETSIZE_sectors 191 - -191 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 2/4 up/down: 313/-330) Total: -17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* uuidgen: move UUID formatting to libbbDenys Vlasenko2026-02-031-3/+3
| | | | | | | | | | | | | function old new delta format_uuid_DCE_37_chars - 94 +94 uuidgen_main 71 53 -18 .rodata 107089 107066 -23 mkswap_main 278 253 -25 volume_id_set_uuid 258 178 -80 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/4 up/down: 94/-146) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: eliminate static variables, fix GPT disk size (32x32->32 overflow)Denys Vlasenko2026-02-011-36/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta verify_sun 481 508 +27 .rodata 107016 107022 +6 verify_sun_cmp 51 54 +3 sun_other_endian 1 - -1 scsi_disk 1 - -1 floppy 1 - -1 xbsd_print_disklabel 838 836 -2 xbsd_new_part 479 477 -2 xbsd_write_bootstrap 397 394 -3 set_sun_partition 103 100 -3 delete_partition 435 432 -3 xbsd_part_index 4 - -4 xbsd_part 4 - -4 verify_sun_starts 4 - -4 part_entry_len 4 - -4 part_array 4 - -4 n_parts 4 - -4 gpt_hdr 4 - -4 check_sun_label 214 208 -6 list_table 1433 1423 -10 fetch_sun 233 219 -14 bsd_select 1564 1546 -18 get_geometry 691 665 -26 get_boot 1539 1513 -26 fdisk_main 4737 4674 -63 ------------------------------------------------------------------------------ (add/remove: 0/10 grow/shrink: 3/12 up/down: 36/-207) Total: -171 bytes text data bss dec hex filename 1078472 555 5088 1084115 108ad3 busybox_old 1078332 555 5056 1083943 108a27 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use fputs_stdoutRon Yorston2021-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta fputs_stdout - 12 +12 zxc_vm_process 7237 7230 -7 yes_main 85 78 -7 write_block 380 373 -7 wrapf 305 298 -7 strings_main 437 430 -7 show_bridge 353 346 -7 rev_main 384 377 -7 put_prompt_custom 58 51 -7 put_cur_glyph_and_inc_cursor 168 161 -7 print_numbered_lines 152 145 -7 print_named_ascii 130 123 -7 print_name 135 128 -7 print_login_issue 386 379 -7 print_ascii 208 201 -7 powertop_main 1249 1242 -7 od_main 1789 1782 -7 logread_main 518 511 -7 head_main 804 797 -7 display_process_list 1319 1312 -7 cut_main 1002 995 -7 bb_dump_dump 1550 1543 -7 bb_ask_noecho 393 386 -7 baseNUM_main 702 695 -7 expand_main 755 745 -10 dumpleases_main 497 487 -10 write1 12 - -12 putcsi 37 23 -14 print_login_prompt 55 41 -14 paste_main 525 511 -14 cat_main 440 426 -14 print_it 245 230 -15 print_addrinfo 1188 1171 -17 print_rule 770 750 -20 print_linkinfo 842 822 -20 httpd_main 791 771 -20 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/34 up/down: 12/-341) Total: -329 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk_aix: fix aliasing warning, comment out unused global variablesDenys Vlasenko2019-10-041-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: use printable_string() for printing filenamesDenys Vlasenko2018-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2726 2792 +66 printable_string2 - 57 +57 identify 4329 4336 +7 expmeta 659 663 +4 add_interface 99 103 +4 beep_main 286 289 +3 changepath 192 194 +2 builtin_type 115 117 +2 devmem_main 469 470 +1 input_tab 1076 1074 -2 create_J 1821 1819 -2 poplocalvars 314 311 -3 doCommands 2222 2214 -8 do_load 918 902 -16 printable_string 57 9 -48 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 8/6 up/down: 146/-79) Total: 67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: commonalize a bit of little-endian CRC32 table generation codeDenys Vlasenko2018-02-011-1/+1
| | | | | | | | | | | | | | | function old new delta global_crc32_new_table_le - 11 +11 crc32_new_table_le - 9 +9 inflate_unzip_internal 560 556 -4 flash_eraseall_main 823 819 -4 unpack_xz_stream 2403 2394 -9 lzop_main 121 112 -9 gzip_main 187 178 -9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/5 up/down: 20/-35) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk_gpt: simplify GPT partition name printingDenys Vlasenko2016-11-271-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: sanitize partition name printing; drop "Code" column; get rid of one ↵Denys Vlasenko2016-11-271-15/+41
| | | | | | | | | | | | | | static var function old new delta list_table 2335 2373 +38 fill_bounds 131 128 -3 part_array_len 4 - -4 get_boot 1584 1574 -10 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 38/-17) Total: 21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: -fno-builtin-printfDenys Vlasenko2015-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Benefits are: drops reference to out-of-line putchar(), fixes a few cases of failed string merge. function old new delta i2cdump_main 1488 1502 +14 sha256_process_block64 423 433 +10 sendmail_main 1183 1185 +2 list_table 1114 1116 +2 i2cdetect_main 1235 1237 +2 fdisk_main 2852 2854 +2 builtin_type 119 121 +2 unicode_conv_to_printable2 325 324 -1 scan_recursive 380 378 -2 mkfs_minix_main 2687 2684 -3 buffer_fill_and_print 178 169 -9 putchar 152 - -152 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 7/4 up/down: 34/-167) Total: -133 bytes text data bss dec hex filename 937788 932 17676 956396 e97ec busybox_old 937564 932 17676 956172 e970c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make smart_ulltoa return pointer to end (allows for code shink in callers)Denys Vlasenko2013-09-061-4/+2
| | | | | | | | | | | | | function old new delta smart_ulltoa5 405 408 +3 smart_ulltoa4 273 276 +3 list_table 1113 1114 +1 scale 36 34 -2 put_lu 55 53 -2 ulltoa6_and_space 19 14 -5 powertop_main 1470 1461 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: fix GPT size math errorsJody Bruchon2013-08-201-2/+2
| | | | | Signed-off-by: Jody Bruchon <jody@jodybruchon.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: whitespace fixesDenys Vlasenko2010-10-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* crc32: cleanups, no code changesDenys Vlasenko2010-10-281-2/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use common crc32 routineDenys Vlasenko2010-10-271-10/+3
| | | | | | | | | | | | | | | | | | function old new delta crc32_block_endian1 - 37 +37 crc32_block_endian0 - 34 +34 global_crc32_table - 8 +8 file_read 82 87 +5 gzip_main 211 214 +3 xz_crc32 40 35 -5 crc32_table 8 - -8 calculate_gunzip_crc 54 34 -20 lzo_crc32 54 25 -29 cksum_main 298 211 -87 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149) Total: -62 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* fdisk: initial stab at GPT partition supportKevin Cernekee2010-10-251-0/+203
Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>