Commit Graph

289 Commits

Author SHA1 Message Date
Alexander Shishkin
7765095441 mount: pass NULL, not "", as "data" to mount syscall if we have no opts
When mounting a filesystem without any additional options (data parameter
to the mount(2) syscall), pass NULL instead of an empty string like GNU
mount does. This fixes, for example mounting cgroup fs with bbox mount.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 06:10:03 +02:00
Alexander Shishkin
54779a47e9 mount: code shrink (-81 bytes)
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:35:47 +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
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
fa1b3705a3 mount: fix a case when sometimes error message is not printed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-27 16:47:40 +02:00
Denys Vlasenko
dc1fd2e52a mount: handle EDQUOT > 255 properly. closes bug 1579
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-19 17:01:29 +02:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Denys Vlasenko
8531d76a15 *: code shrink and better "died from signal" reporting from wait4pid
function                                             old     new   delta
parse                                                964     967      +3
udhcp_run_script                                     670     665      -5
singlemount                                          911     906      -5
mount_it_now                                         360     355      -5
inotifyd_main                                        521     516      -5
xspawn                                                21       -     -21
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41)             Total: -38 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18 22:44:00 +01:00
Denys Vlasenko
99069330a1 *: gethostname-related fixes
function                                             old     new   delta
hostname_main                                        218     231     +13
nfsmount                                            3541    3474     -67

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-27 19:38:19 +01:00
Denys Vlasenko
b741cd28d1 whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-06 13:25:12 +01:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +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
cc428147c1 mount: dont include NFS headers if not needed; drop support for Linux <2.2.0
function                                             old     new   delta
nfs_err_stat                                           -      18     +18
nfs_err_errnum                                         -      18     +18
nfs_strerror                                          56      50      -6
nfsmount                                            3567    3541     -26
nfs_errtbl                                            80       -     -80
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/2 up/down: 36/-112)           Total: -76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-16 02:06:56 +01:00
Denys Vlasenko
b7a0e13d1c mount: fix goof in last commit; clear errno since we use perror_msg later
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-15 16:36:14 +01:00
Denys Vlasenko
4e60f304d4 mount: if we mount //host/xxx, add ip=IPADDR to options
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-15 01:28:59 +01:00
Denys Vlasenko
8656676a21 mount: "already mounted" msg appears only if -v
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-10 21:32:28 +01:00
Denys Vlasenko
a7329667b4 mount: prevent second mount -a from mounting everything again
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-05 04:25:19 +01:00
Michael Abbott
6b5accbfc1 mount: add support for -O list. +44 bytes
Signed-off-by: Michael Abbott <michael@araneidae.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-04 03:33:07 +01:00
Denys Vlasenko
b2e5fc35eb ntpd: and real handling for -N, show usage w/o options; trim text
function                                             old     new   delta
ntp_init                                             317     348     +31
bb_msg_you_must_be_root                                -      17     +17
xsocket                                               66      76     +10
changepath                                           195     194      -1
bb_msg_perm_denied_are_you_root                       35      34      -1
send_tree                                            355     353      -2
count_lines                                           74      72      -2
must_be_root                                          17       -     -17
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/4 up/down: 58/-23)             Total: 35 bytes
   text   data    bss    dec    hexfilename
 832873    441   7548 840862  cd49ebusybox_old
 832839    441   7548 840828  cd47cbusybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-25 14:52:47 +01:00
Denys Vlasenko
102ff76c84 mount: clean up #defines. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-21 17:14:08 +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
Vladimir Dronnikov
be168b1197 wget: fix for code 302; mount: support -o union
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-05 02:18:01 +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
ba98603264 mount: do not execute "mount.(null)" :)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-15 23:00:09 +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
e2e4cc249d mount: support -i; pass through -f and -n to helpers as necessary
function                                             old     new   delta
mount_it_now                                         298     345     +47
singlemount                                          776     772      -4

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 11:48:29 +02:00
Denys Vlasenko
810b7161dc mount: save 80 bytes by forced de-inlining
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-13 23:48:59 +02:00
Denys Vlasenko
e71dd7c1db mount: document when kernel started accepting string as NFS options
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-13 16:32:32 +02:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
5c32993009 mount: users report that CIFS support is breaking things,
mostly remove it.
2009-04-12 12:16:21 +00:00
Denis Vlasenko
7aaedcf21e mount: support "-O option"; stop trying to mount swap partitions
function                                             old     new   delta
mount_main                                           975    1152    +177
umount_main                                          640     636      -4
packed_usage                                       25666   25662      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 177/-8)            Total: 169 bytes
2009-03-14 22:57:20 +00:00
Denis Vlasenko
6a2d0d9b8d mount: make it more readable 2008-12-10 11:39:18 +00:00
Denis Vlasenko
3f8f4b2a93 placate Rob's qualms about mount.c 2008-12-10 11:28:30 +00:00
Denis Vlasenko
30e5cf8875 mount: cosmetics, no code changes (verified with objdump -drsx) 2008-12-05 16:40:36 +00:00
Denis Vlasenko
f9dde919d6 mount: -o parm1 -o parm2 should accumulate 2008-10-18 19:15:57 +00:00
Bernhard Reutner-Fischer
fb5902ca5c - support relatime / norelatime 2008-08-06 18:14:38 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
c29684afd6 mount: support nfs mount option nordiplus.
By Octavian Purdila <opurdila AT ixiacom.com>

function                                             old     new   delta
static.options                                       272     281      +9
daemonize                                            130     107     -23
singlemount                                         4674    4579     -95
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 9/-118)           Total: -109 bytes
2008-07-19 22:40:30 +00:00
Denis Vlasenko
deeed59de0 libbb: introduce and use xrealloc_vector
function                                             old     new   delta
xrealloc_vector_helper                                 -      51     +51
create_list                                           84      99     +15
getopt_main                                          690     695      +5
passwd_main                                         1049    1053      +4
get_cached                                            85      89      +4
msh_main                                            1377    1380      +3
add_match                                             42      41      -1
read_lines                                           720     718      -2
grave                                               1068    1066      -2
fill_match_lines                                     143     141      -2
add_to_dirlist                                        67      65      -2
add_input_file                                        49      47      -2
act                                                  252     250      -2
fsck_main                                           2252    2246      -6
man_main                                             765     757      -8
bb_internal_initgroups                               228     220      -8
cut_main                                            1052    1041     -11
add_edge_to_node                                      55      43     -12
dpkg_main                                           3851    3835     -16
ifupdown_main                                       2202    2178     -24
sort_main                                            838     812     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124)          Total: -42 bytes
2008-07-08 05:14:36 +00:00
Denis Vlasenko
580ce2d138 mount: support for "-o mand" 2008-07-08 02:56:53 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
82604e9730 revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
58d60c3333 *: introduce and use xfork()
function                                             old     new   delta
xfork                                                  -      20     +20
msh_main                                            1377    1380      +3
mod_process                                          455     446      -9
forkexit_or_rexec                                     30      17     -13
expand_variables                                    1434    1421     -13
open_transformer                                      91      76     -15
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/4 up/down: 23/-50)            Total: -27 bytes
2008-07-01 11:11:24 +00:00
Denis Vlasenko
f26e3d2e41 mount: fix mishandling of proto=tcp/udp
function                                             old     new   delta
singlemount                                         4729    4695     -34
2008-06-24 21:39:32 +00:00
Denis Vlasenko
d0cc3f4ade mount: code shrink without logic changes. Added a comment
on possible mismatch with util-linux in -o remount handling.

function                                             old     new   delta
mount_main                                           995     953     -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-42)             Total: -42 bytes
2008-06-24 18:59:59 +00:00
Bernhard Reutner-Fischer
f9a0784144 - add FIXME to use hasmntopt() 2008-05-30 10:44:37 +00:00
Denis Vlasenko
a0e17f7df6 [u]mount: add/update dietlibc build fix 2008-05-26 01:19:53 +00:00
Denis Vlasenko
6b06cb80be more of -Wall fixes from Cristian Ionescu-Idbohrn.
Some are fixing real bugs.

function                                             old     new   delta
syslogd_main                                         938     958     +20
get_signum                                           136     143      +7
obj_load                                             777     782      +5
recv_from_to                                         210     214      +4
get_next_block                                      1795    1799      +4
display_topmem_process_list                         1117    1121      +4
logread_main                                         484     487      +3
buffer_fill_and_print                                 73      76      +3
kill_main                                            687     689      +2
ll_remember_index                                    240     241      +1
do_stats                                             452     453      +1
if_readconf                                          166     165      -1
display_process_list                                1192    1191      -1
run_applet_and_exit                                  507     505      -2
print_signames                                        33      31      -2
parse_one_line                                      1092    1090      -2
find_out_spec                                         57      55      -2
add_ksymoops_symbols                                 421     419      -2
ash_main                                            1407    1402      -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17)            Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
77ad97f199 more -Wall warning fixes from Cristian Ionescu-Idbohrn.
This time it resulted in small code changes:

function                                             old     new   delta
nexpr                                                820     828      +8
tail_main                                           1200    1202      +2
wrapf                                                166     167      +1
parse_mount_options                                  227     209     -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18)             Total: -7 bytes
2008-05-13 02:27:31 +00:00
Denis Vlasenko
ed23adce72 mount: remove superfluous comment 2008-04-07 21:05:59 +00:00