Commit Graph

69 Commits

Author SHA1 Message Date
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
Mike Frysinger
e0942acb9e blkid: add bcache support
URL: https://bugs.gentoo.org/508596
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-12-16 14:42:25 -05:00
Alfonso Ranieri
a90490fb69 volume_id: fix a buglet introduced by is_prefixed_with() conversion
Signed-off-by: Alfonso Ranieri <alforan@tin.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-04-14 14:32:39 +02: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
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
Sven-Göran Bergh
9369634167 volume_id: add f2fs detection
function                                             old     new   delta
volume_id_probe_f2fs                                   -      98     +98

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-01 11:05:08 +02:00
Sven-Göran Bergh
e418b2e7bb volume_id: nilfs config description.
Config description for nilfs added.

No code change.

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 18:30:34 +02:00
Sven-Göran Bergh
15d0a860e9 volume_id: Adopt to new config style.
Config instructions for util-linux/volume_id are moved into the
source files according to the new config feature.

No code change.

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 15:57:59 +02:00
Sven-Göran Bergh
3b45801dc6 volume_id: Adopt to new kbuild style.
Kbuild instructions for util-linux/volume_id are moved into the
source files according to the new build feature.

No code change.

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 15:45:20 +02:00
Denys Vlasenko
aa94130f74 volume_id_internal.h: drop unoptimized byteswap routines
function                                             old     new   delta
volume_id_probe_hfs_hfsplus                          802     627    -175

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-15 09:36:40 +02:00
Oliver Metz
041baf2720 volume_id: fix ntfs attribute search
len is declared as uint32_t but le16_to_cpu macro is used

Signed-off-by: Oliver Metz <oliver.metz@gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-09 07:45:51 +02:00
Denys Vlasenko
60cb48ca50 whitespace cleanup. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 15:57:44 +01:00
Denys Vlasenko
90801dadfa Remove redundant 'config FEATURE_VOLUMEID_SQUASHFS'
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:24:27 +01:00
Sven-Göran Bergh
6928d9f049 volume_id: add squashfs detection
function                                             old     new   delta
volume_id_probe_squashfs                               -      74     +74
fs1                                                   12      16      +4

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:21:41 +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
Sven-Göran Bergh
5218515508 volume_id: uuid_format small code shrink
function                                             old     new   delta
volume_id_set_uuid                                   318     300     -18

Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:52:03 +01:00
Sven-Göran Bergh
07b419dbcb volume_id: display hfs[+] 128-bit UUID properly
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:37:00 +01:00
Sven-Göran Bergh
a58f7b7d2f blkid: add type display for hfsplus
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:35:31 +01:00
S-G Bergh
e4b9451413 volume_id: add exFAT detection
function                                             old     new   delta
volume_id_probe_exfat                                  -     294    +294

Signed-off-by: S-G Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-11-13 14:40:37 +01:00
S-G Bergh
d2d5049c1d blkid: show filesystem when both label and UUID are missing, but type is known
Signed-off-by: S-G Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-11-05 13:16:07 +01:00
Sven-Göran Bergh
c5a9fa2d2a blkid: add support for nilfs2
function                                             old     new   delta
volume_id_probe_nilfs                                  -      99     +99
fs2                                                   52      56      +4

Signed-off-by: Sven-Göran Bergh <svengbergh-busybox@yahoo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 15:34:39 +02:00
Denys Vlasenko
8019b3a7ae volume_id: code shrink
function                                             old     new   delta
volume_id_set_unicode16                              200     173     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 15:33:47 +02:00
Sven-Göran Bergh
11f2c0d4f8 blkid: add type display for btrfs
Signed-off-by: Sven-Göran Bergh <svengbergh-busybox@yahoo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:56:25 +02:00
Denys Vlasenko
ac164dd2a7 volume_id/ext: use common bb_e2fs_defs.h for ext2/3/4 constants and structs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-12 15:00:35 +02:00
Denys Vlasenko
0133921726 volume_id/ext: detect ext4 too
function                                             old     new   delta
volume_id_probe_ext                                  108     132     +24

Signed-off-by: Dees Troy<dees_troy@teamw.in>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 02:51:27 +02:00
Denys Vlasenko
e8cfc3f693 blkid: if parameters are given, do not scan /dev
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-03 15:09:07 +01:00
Denys Vlasenko
c3375f0389 volume_id/get_devname: trivial code shrink
function                                             old     new   delta
uuidcache_init                                        36      41      +5
get_devname_from_uuid                                 55      51      -4
get_devname_from_label                                61      57      -4
display_uuid_cache                                   109     105      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-12)              Total: -7 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-06 15:06:59 +01:00
Denys Vlasenko
48a5219f39 reverted LINHIB0001 swap signature addition
see:

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/683605

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14 03:52:16 +01:00
Denys Vlasenko
90615a0c5c blkid: optional support for TYPE="fstype"
Adapted from patch created by T4ndeta <t4ndeta@gmail.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 00:40:11 +01:00
James Hunt
86ffe5c15a volume_id: recognize compressed hibernate swap signature
util-linux/volume_id/linux_swap.c: Added the new magic LINHIB0001
signature.

See:

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/683605

Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 17:18:45 +01: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
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
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
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
Vladimir Dronnikov
73ccd0ca87 volume_id/linux_swap: detect suspended image signatures too
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-08 03:08:05 +01:00
Denys Vlasenko
12ca080a1c *: eliminate more aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 18:41:18 +01:00
Denys Vlasenko
6b9f163353 *: style fixes. no code changes (verified with objdump)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 02:24:24 +01:00
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
d784b65be7 btrfs.c: check first two superblocks, for additional robustness
function                                             old     new   delta
volume_id_probe_btrfs                                 94     142     +48

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 00:12:35 +01:00
Denys Vlasenko
893009644f volume_id: add FAST_FUNC where appropriate
function                                             old     new   delta
volume_id_probe_iso9660                              324     327      +3
volume_id_probe_vfat                                 902     903      +1
volume_id_probe_udf                                  576     577      +1
volume_id_probe_ntfs                                 314     315      +1
uuidcache_check_device                               292     291      -1
volume_id_probe_xfs                                   87      85      -2
volume_id_probe_sysv                                 165     163      -2
volume_id_probe_romfs                                 89      87      -2
volume_id_probe_reiserfs                             236     234      -2
volume_id_probe_ocfs2                                 96      94      -2
volume_id_probe_luks                                  78      76      -2
volume_id_probe_linux_swap                           165     163      -2
volume_id_probe_jfs                                   96      94      -2
volume_id_probe_hfs_hfsplus                          795     793      -2
volume_id_probe_ext                                   82      80      -2
volume_id_probe_cramfs                                59      57      -2
volume_id_probe_btrfs                                 96      94      -2
free_volume_id                                        36      31      -5
volume_id_probe_linux_raid                           127     119      -8
volume_id_probe_all                                  152     138     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/16 up/down: 6/-52)            Total: -46 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-01 23:07:18 +01:00
Vladimir Dronnikov
662e8b79d0 volume_id: add support for btrfs
function                                             old     new   delta
volume_id_probe_btrfs                                  -      96     +96
fs2                                                   48      52      +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 100/0)             Total: 100 bytes

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-01 23:05:09 +01:00
Denys Vlasenko
606291beab *: more portability fixes by Dan Fandrich
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 23:15:43 +02:00
Natanael Copa
9aff29997e swaponoff: add uuid/label support. By Natanael Copa
function                                             old     new   delta
swap_enable_disable                                  130     150     +20
resolve_mount_spec                                    76      96     +20
mount_main                                          1152    1154      +2
findfs_main                                          125      80     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 42/-45)             Total: -3 bytes

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-20 04:28:22 +02:00
Denys Vlasenko
8dc0e1929e use PACKED macro insted of open-coding GCC-ism
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 00:58:11 +02:00
Denys Vlasenko
da49f58524 move libc related stuff out of platform.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-08 02:58:38 +02:00
Denys Vlasenko
1881ba48b1 Update a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-27 22:09:28 +02:00
Denys Vlasenko
4fc5ec56f9 device matching against UUIDs: do not try floppies
function                                             old     new   delta
uuidcache_check_device                               255     292     +37

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-27 21:58:25 +02:00
Denys Vlasenko
d5f1b1bbe0 *: add FAST_FUNC to function ptrs where it makes sense
function                                             old     new   delta
evalcommand                                         1195    1209     +14
testcmd                                                -      10     +10
printfcmd                                              -      10     +10
echocmd                                                -      10     +10
func_exec                                            270     276      +6
echo_dg                                              104     109      +5
store_nlmsg                                           85      89      +4
pseudo_exec_argv                                     195     198      +3
dotcmd                                               287     290      +3
machtime_stream                                       29      31      +2
discard_stream                                        24      26      +2
argstr                                              1299    1301      +2
killcmd                                              108     109      +1
evalfor                                              226     227      +1
daytime_stream                                        43      44      +1
run_list                                            2544    2543      -1
lookupvar                                             62      61      -1
ipaddr_modify                                       1310    1309      -1
...
parse_stream                                        2254    2245      -9
evalpipe                                             356     347      -9
collect_if                                           210     197     -13
read_opt                                             869     851     -18
handle_dollar                                        681     658     -23
print_addrinfo                                      1342    1303     -39
iterate_on_dir                                       156      59     -97
print_route                                         1709    1609    -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767)       Total: -693 bytes
   text    data     bss     dec     hex filename
 841748     467    7872  850087   cf8a7 busybox_old
 841061     467    7872  849400   cf5f8 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 12:06:05 +02:00
Denis Vlasenko
f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Denis Vlasenko
9983d806d9 volumeid: fix bug 249 "findfs finds the wrong partition" 2009-03-31 19:47:34 +00:00