summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_ext2.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove "select PLATFORM_LINUX"Denys Vlasenko2022-11-291-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix non-Linux buildsSamuel Thibault2022-11-291-0/+1
| | | | | | | | | | | Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-301-1/+1
| | | | | | | | text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: drop PLATFORM_LINUXRon Yorston2020-08-131-2/+0
| | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move storage helpers to libbb.hDenys Vlasenko2018-09-281-17/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2, mkfs_vfat: fix warnings in STORE_LE on big-endian platformsDenys Vlasenko2018-02-151-3/+3
| | | | | | "warning: large integer implicitly truncated to unsigned type [-Woverflow]" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-2/+2
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add comment about APPLET_ODDNAME formatDenys Vlasenko2017-01-291-1/+2
| | | | | | It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make mke2fs and mkfs.ext2 individually selectableDenys Vlasenko2016-11-161-0/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace a few more bb_info_msg's by bb_error_msg or printfDenys Vlasenko2016-03-301-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Use bb_error_msg instead of bb_info_msg in all commented-out debug printoutsDenys Vlasenko2016-03-301-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: fix the wrongly stored fs creation timeDenys Vlasenko2012-06-211-7/+4
| | | | | | This bug made our ext2 images non-mountable by ext4 driver. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Drop include/bb_linux_ext2_fs.h, use existing e2fsprogs/e2fs_defs.hDenys Vlasenko2012-04-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Create and use our own copy of linux/ext2_fs.hDenys Vlasenko2012-04-131-7/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* work around linux/ext2_fs.h breakageDenys Vlasenko2012-04-121-0/+6
| | | | | | See https://bugzilla.kernel.org/show_bug.cgi?id=42986 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mke2fs: do not zero out first kilobyte. Closes 3247Denys Vlasenko2012-01-111-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+39
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: whitespace fixesDenys Vlasenko2010-10-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: add xfstat functionDenys Vlasenko2010-08-311-1/+1
| | | | | | | | | | | | | | | | function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: improve comments a bitDenys Vlasenko2010-06-181-3/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: reuse stringBernhard Reutner-Fischer2010-06-181-1/+1
| | | | | | | | | | function old new delta mkfs_ext2_main 2376 2378 +2 .rodata 135872 135848 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-24) Total: -22 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mkfs_ext2: fix handling of -I argumentBernhard Reutner-Fischer2010-06-181-1/+1
| | | | | | -I <unsigned int> but was treated as a character Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* tune2fs: move to e2fsprogsDenys Vlasenko2010-05-091-4/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fix bad comment. no code changesDenys Vlasenko2010-02-021-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkXXXX: unify [KBYTES] parameter handling (added it to mkswap)Denys Vlasenko2010-02-011-13/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixesDenys Vlasenko2010-01-251-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fix compile errorDenys Vlasenko2009-10-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: code shrinkDenys Vlasenko2009-10-221-8/+9
| | | | | | | function old new delta mkfs_ext2_main 2505 2492 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fix a bug where we don't fully respect -n on filesDenys Vlasenko2009-10-221-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: use compatible inode sizes; add -I <inodesize>. (by Vladimir)Denys Vlasenko2009-10-221-19/+32
| | | | | | | | | | function old new delta mkfs_ext2_main 2385 2495 +110 packed_usage 26400 26447 +47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 157/0) Total: 157 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: 1.41.9 compatDenys Vlasenko2009-10-221-17/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: make sure we extend the image to requested sizeDenys Vlasenko2009-10-211-1/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: e2fsck 1.14.4 compatDenys Vlasenko2009-10-211-5/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: explain 256-byte inodes. no code changesDenys Vlasenko2009-10-211-19/+39
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: explain why 0.5G+ images are a bit differentDenys Vlasenko2009-10-211-4/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: another update by VladimirDenys Vlasenko2009-10-201-52/+95
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* clarify in commentDenys Vlasenko2009-10-201-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: further work on small imagesDenys Vlasenko2009-10-201-14/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fixes for small image generation. images up to ~8M are ok nowDenys Vlasenko2009-10-201-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fix 60k image creationDenys Vlasenko2009-10-201-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: further work by VladimirDenys Vlasenko2009-10-201-39/+39
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: small tweakDenys Vlasenko2009-10-201-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: compat fixesDenys Vlasenko2009-10-201-190/+197
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: more work. added test scriptDenys Vlasenko2009-10-181-75/+99
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_ext2: fixes for huge filesystemsDenys Vlasenko2009-10-181-23/+43
| | | | | | | | | function old new delta mkfs_ext2_main 2145 2617 +472 div_roundup 15 35 +20 packed_usage 26792 26776 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>