Commit Graph

302 Commits

Author SHA1 Message Date
Denys Vlasenko
1d3a04a3a4 Code style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-28 01:22:57 +01:00
Denys Vlasenko
5bbee27c0f Remove outdated comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23 21:51:11 +01:00
Denys Vlasenko
3e134ebf6a *: slap on a few ALIGN1/2s where appropriate
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map"

   text	   data	    bss	    dec	    hex	filename
 829901	   4086	   1904	 835891	  cc133	busybox_before
 829665	   4086	   1904	 835655	  cc047	busybox

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22 18:09:21 +02:00
Denys Vlasenko
47cfbf32fd *: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 18:18:48 +02:00
Denys Vlasenko
e6a2f4cc5a libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for it
The config item is FEATURE_USE_BSS_TAIL. When it is off (default):

function                                             old     new   delta
read_config                                          210     228     +18
doCommands                                          2279    2294     +15
ipneigh_list_or_flush                                763     772      +9
ipaddr_list_or_flush                                1256    1261      +5
display_process_list                                1301    1306      +5
conspy_main                                         1378    1383      +5
do_lzo_compress                                      352     355      +3
do_lzo_decompress                                    565     567      +2
push                                                  46      44      -2
inetd_main                                          2136    2134      -2
uevent_main                                          421     418      -3
addLines                                              97      92      -5
bb_common_bufsiz1                                   8193    1024   -7169
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181)        Total: -7119 bytes
   text	   data	    bss	    dec	    hex	filename
 829850	   4086	   9080	 843016	  cdd08	busybox_old
 829901	   4086	   1904	 835891	  cc133	busybox_unstripped

FEATURE_USE_BSS_TAIL=y:

read_config                                          210     228     +18
doCommands                                          2279    2294     +15
ipneigh_list_or_flush                                763     772      +9
ipaddr_list_or_flush                                1256    1261      +5
display_process_list                                1301    1306      +5
conspy_main                                         1378    1383      +5
do_lzo_compress                                      352     355      +3
do_lzo_decompress                                    565     567      +2
inetd_main                                          2136    2134      -2
bb_common_bufsiz1                                   8193       -   -8193
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195)        Total: -8133 bytes
   text	   data	    bss	    dec	    hex	filename
 829850	   4086	   9080	 843016	  cdd08	busybox_old
 829911	   4086	    880	 834877	  cbd3d	busybox_unstripped

FIXME: setup_common_bufsiz() calls are missing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 17:39:11 +02:00
Denys Vlasenko
c418f48d8d fsck: use printf for message, not bb_info_msg
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-03-30 16:30:24 +02:00
Denys Vlasenko
76b680c7a8 Use bb_error_msg instead of bb_info_msg in all commented-out debug printouts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-03-30 16:04:37 +02:00
Denys Vlasenko
c4fb8c6ad5 fsck: do not use statics
function                                             old     new   delta
fsck_main                                           1794    1812     +18
packed_usage                                       30662   30664      +2
kill_all_if_got_signal                                60      62      +2
create_fs_device                                     158     160      +2
static.kill_sent                                       1       -      -1
skip_root                                              1       -      -1
serialize                                              1       -      -1
parallel_root                                          1       -      -1
noexecute                                              1       -      -1
fs_type_negated                                        1       -      -1
force_all_parallel                                     1       -      -1
verbose                                                4       -      -4
num_running                                            4       -      -4
num_args                                               4       -      -4
max_running                                            4       -      -4
instance_list                                          4       -      -4
fstype                                                 4       -      -4
fs_type_list                                           4       -      -4
fs_type_flag                                           4       -      -4
filesys_last                                           4       -      -4
filesys_info                                           4       -      -4
args                                                   4       -      -4
wait_one                                             309     300      -9
ignore                                               196     174     -22
------------------------------------------------------------------------------
(add/remove: 0/18 grow/shrink: 4/2 up/down: 24/-82)           Total: -58 bytes
   text    data     bss     dec     hex filename
 938527     932   17448  956907   e99eb busybox_old
 938487     932   17392  956811   e998b busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-19 02:24:14 +02:00
Denys Vlasenko
36647abcc3 chattr,lsattr: shorten help message
function                                             old     new   delta
packed_usage                                       30662   30645     -17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-19 01:29:20 +02:00
Denys Vlasenko
000eda41c0 e2fsprogs/*: convert to new-style "one file" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-18 22:40:23 +02:00
Denys Vlasenko
ce193f809b Remove old_e2fsprogs/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-19 23:12:51 +02:00
Maninder Singh
0fabedf085 fix if(p)/free(p) construct
No need of explicit NULL check before free.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-06-07 18:19:43 +02:00
Maninder Singh
97c6491b4e typo fixes
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25 13:46:36 +02:00
Denys Vlasenko
379e8e81af typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-26 10:49:02 +01:00
Denys Vlasenko
8dff01d06a libbb: introduce and use is_prefixed_with()
function                                             old     new   delta
is_prefixed_with                                       -      18     +18
complete_username                                     78      77      -1
man_main                                             737     735      -2
fsck_device                                          429     427      -2
unpack_ar_archive                                     80      76      -4
strip_unsafe_prefix                                  105     101      -4
singlemount                                         1054    1050      -4
rtc_adjtime_is_utc                                    90      86      -4
resolve_mount_spec                                    88      84      -4
parse_one_line                                      1029    1025      -4
parse_conf                                          1460    1456      -4
may_wakeup                                            83      79      -4
loadkmap_main                                        219     215      -4
get_irqs_from_stat                                   103      99      -4
get_header_cpio                                      913     909      -4
findfs_main                                           79      75      -4
fbsplash_main                                       1230    1226      -4
load_crontab                                         776     771      -5
expand_vars_to_list                                 1151    1146      -5
date_main                                            881     876      -5
skip_dev_pfx                                          30      24      -6
make_device                                         2199    2193      -6
complete_cmd_dir_file                                773     767      -6
run_applet_and_exit                                  715     708      -7
uudecode_main                                        321     313      -8
pwdx_main                                            197     189      -8
execute                                              568     560      -8
i2cdetect_main                                      1186    1176     -10
procps_scan                                         1242    1230     -12
procps_read_smaps                                   1017    1005     -12
process_module                                       746     734     -12
patch_main                                          1903    1891     -12
nfsmount                                            3572    3560     -12
stack_machine                                        126     112     -14
process_timer_stats                                  449     435     -14
match_fstype                                         111      97     -14
do_ipaddr                                           1344    1330     -14
open_list_and_close                                  359     343     -16
get_header_tar                                      1795    1779     -16
prepend_new_eth_table                                340     323     -17
fsck_main                                           1811    1794     -17
find_iface_state                                      56      38     -18
dnsd_main                                           1321    1303     -18
base_device                                          179     158     -21
find_keyword                                         104      82     -22
handle_incoming_and_exit                            2785    2762     -23
parse_and_put_prompt                                 774     746     -28
modinfo                                              347     317     -30
find_action                                          204     171     -33
update_passwd                                       1470    1436     -34
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540)         Total: -522 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-12 17:48:34 +01:00
Denys Vlasenko
327f550669 Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-29 16:45:45 +01:00
Denys Vlasenko
9b2a9f0210 fix assorted unused code and wrong format specs found by cppchekc (bug 6716)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-29 16:43:33 +01:00
Denys Vlasenko
6967578728 whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 01:34:48 +01:00
Denys Vlasenko
9371043698 fix unsafe bb_perror_msg(filename) calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27 15:35:10 +02:00
Denys Vlasenko
176bc34475 Drop include/bb_linux_ext2_fs.h, use existing e2fsprogs/e2fs_defs.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-17 15:06:55 +02:00
Denys Vlasenko
0b2b0f31a3 Create and use our own copy of linux/ext2_fs.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-13 16:39:18 +02:00
Denys Vlasenko
caf5768154 work around linux/ext2_fs.h breakage
See https://bugzilla.kernel.org/show_bug.cgi?id=42986

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-12 14:01:10 +02:00
Denys Vlasenko
901365fcff old_e2fsprogs/blkid: close the fd after we are done with it
Some people have HUGE /dev/*...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-28 18:57:04 +01:00
Denys Vlasenko
46aa5e0859 tune2fs: add support for -C MOUNT_COUNT. +40 bytes. Closes 3901.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-11 20:08:12 +02:00
Denys Vlasenko
66426760be *: remove "Options:" string from help texts
function                                             old     new   delta
packed_usage                                       28706   28623     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Denys Vlasenko
60a9414cad fix "variable 'foo' set but not used" warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 20:57:01 +02:00
Maksym Kryzhanovskyy
29c54aa9f9 iostat: code shrink ~0.5k
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-07 04:37:22 +02:00
Marek Polacek
b0b8884009 Fix double words in comments. No code changes
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 17:33:43 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Pere Orga
6a3e01d5a9 move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03 01:33:55 +02:00
Denys Vlasenko
e3b1a1fd28 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 22:24:08 +01:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
5360059131 libbb: introduce and use strcpy_and_process_escape_sequences
function                                             old     new   delta
strcpy_and_process_escape_sequences                    -      50     +50
bb_process_escape_sequence                           148     138     -10
printf_main                                          789     776     -13
getty_main                                          1897    1831     -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23 21:06:06 +02:00
Richard Braun
5aa4d53273 tune2fs: implement -c and -i options
function                                             old     new   delta
tune2fs_main                                         165     256     +91

Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-05 00:39:46 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
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>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
9768a82eb0 *: fix "see file License ..." - the file is named LICENSE (in uppercase)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:04:14 +02:00
Denys Vlasenko
7783248eaa *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12 14:14:45 +02:00
Denys Vlasenko
ba2dcccd79 *: trailing empty lines removed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:49:12 +02:00
Denys Vlasenko
0f8960542f *: more empty lines removed. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:35:44 +02:00
Denys Vlasenko
f3ea792bad *: mass cosmetic removal of extra empty lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Jeremie Koenig
1d7266d3b5 mark Linux-specific configuration options
PLATFORM_LINUX is used as a dependency for applets or features
which require Linux-specific interfaces.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:44:56 +02:00
Denys Vlasenko
fb4cb1c416 tweak defconfig
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-18 23:02:36 +02:00
Pascal Bellard
926031b764 *: introduce and use xfork() and xvfork()
function                                             old     new   delta
launch_helper                                        170     169      -1
setup_heredoc                                        312     302     -10
handle_dir_common                                    367     354     -13
expand_vars_to_list                                 2456    2443     -13
open_transformer                                      89      74     -15
data_extract_to_command                              439     423     -16
do_ipaddr                                           1406    1389     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85)             Total: -85 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 15:32:38 +02:00
Denys Vlasenko
b87c17cd16 *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anyway
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 15:15:24 +02:00
Denys Vlasenko
d70e0e995e *: add INSERTs to *.src files where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 12:15:11 +02:00
Denys Vlasenko
2f32bf8be6 remove defconfig. Now "make defconfig" simply uses defaults from Config.in
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 04:14:28 +02:00
Denys Vlasenko
da929a95aa mass renaming Kbuild -> Kbuild.src, Config.in -> Config.src
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 20:10:51 +02:00
Denys Vlasenko
6774386d95 tune2fs: move to e2fsprogs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09 00:13:40 +02:00