Nikolaus Voss
c3cf1e30a3
mdev: use $DEVNAME in uevent sysfs file for device node name
...
516530c932
uses $DEVNAME variable
for device node name. This is fine, but only works for hotplugging,
"mdev -s" will behave differently when DEVNAME and basename(path)
differ.
This patch extracts the DEVNAME from the uevent sysfs file in
make_device(), thus works for hot- and coldplugging; so using
the environment DEVNAME on hotplug events is no longer necessary.
Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-13 03:55:11 +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
d35cbad0ef
mdev: call index_in_strings on $ACTION only after we checked it for NULL
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-02 14:37:06 +02:00
Denys Vlasenko
2c24806bf4
hexdump: need to use xstrtoull for off_t
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27 15:18:32 +01:00
Denys Vlasenko
ef6747e290
hexdump: don't unconditionally limit the usable address range
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27 15:15:33 +01:00
Denys Vlasenko
7c6f2d4207
mkfs_minix: use get_volume_size_in_bytes instead of local version
...
Hopefully this also closes 4730
function old new delta
valid_offset 55 - -55
mkfs_minix_main 2925 2674 -251
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-306) Total: -306 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 02:26:58 +01:00
Denys Vlasenko
4424dfd69b
mdev: fix build failure
...
The error was "error: 'struct globals' has no member named 'parser'"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 23:01:17 +01:00
Mandeep Singh Baines
7991d45446
losetup: fix util-linux compatibility
...
Added -a support. Also made sure -f works as follows:
losetup [-r] [-o offset] {-f|loopdev} file
Removed support for 'losetup -r' with no arguments.
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 16:31:25 -04:00
Denys Vlasenko
5bce135e36
mdev: improve $SEQ handling; improve debug logging
...
Sequential run of concurrent mdev's was too simplistic:
they waited for /dev/mdev.seq to match. This could sometimes
cause cumulative loss of time on the order of a second.
Added SIGCHLD signaling from exiting mdev to all other mdev's.
Added debugging required to see that code actually works as intended.
Example of /dev/mdev.log (with "woken up" elevated from dbg lvl 3 to 2):
mdev[1023]: first seq written
^^^^ seq, not pid
mdev[1023]: 35.022395 ACTION:add SUBSYSTEM:module DEVNAME:(null) DEVPATH:/module/lib80211
mdev[1023]: rule matched, line -1
^^^^^^^ means "default rule"
mdev[1023]: 35.022676 exiting
^^^^^^^^^ second,usec timestamp
mdev[1024]: 35.069691 ACTION:add SUBSYSTEM:vc DEVNAME:vcs9 DEVPATH:/devices/virtual/vc/vcs9
mdev[1024]: dev 7,9
mdev[1025]: 35.069889 waiting for '1024'
mdev[1026]: 35.069946 waiting for '1024'
mdev[1027]: 35.070151 waiting for '1024'
mdev[1024]: rule matched, line -1
mdev[1024]: mknod vcs9 (7,9) 20660 0:0
mdev[1024]: 35.070346 exiting
mdev[1025]: woken up
mdev[1026]: woken up
mdev[1025]: 35.071213 ACTION:add SUBSYSTEM:vc DEVNAME:vcsa9 DEVPATH:/devices/virtual/vc/vcsa9
^^^^^^^^^ took only a millisecond to start running after prev mdev exited
mdev[1025]: dev 7,137
mdev[1027]: woken up
mdev[1025]: rule matched, line -1
mdev[1025]: mknod vcsa9 (7,137) 20660 0:0
mdev[1025]: 35.072109 exiting
function old new delta
mdev_main 849 1372 +523
curtime - 59 +59
dirAction 87 134 +47
static.ts - 8 +8
keywords 19 12 -7
make_device 2189 2119 -70
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-27 10:51:41 +01:00
Denys Vlasenko
40b97fb31e
mdev: add environment variable match
...
function old new delta
make_device 1998 2189 +191
clean_up_cur_rule 61 96 +35
dirAction 75 87 +12
mdev_main 838 849 +11
packed_usage 29272 29273 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 250/0) Total: 250 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 00:40:46 +01:00
Aaro Koskinen
cf5731bcbd
fdisk_sun: fix partition alignment
...
When the display unit is sectors, the partition alignment will convert
the partition start to a wrong unit (it should always be in sectors). Fix
this.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-11 00:22:59 +01:00
Aaro Koskinen
1bd5ca2f53
fdisk_sun: fix corrupted partition data with blank disk
...
After creating Sun disk label for the first time for a blank disk,
the partition table appears corrupted because current_label_type will
never get set to a proper type. Fix this by calling check_sun_label()
after BusyBox has created the label.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-11 00:22:48 +01:00
Denys Vlasenko
ba76b7a40b
mdev: chdir back to /dev after trying to read firmware
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-04 23:35:27 +01:00
Denys Vlasenko
6e29d07417
mdev: extend debug logging output
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-30 16:51:22 +01:00
Denys Vlasenko
ee3bc70cea
getopt: improve help text; code shrink
...
function old new delta
generate_output 356 351 -5
packed_usage 29271 29257 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-24 11:36:00 +01:00
Denys Vlasenko
9b7ebfe644
mount: whitespace fix. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-22 11:00:45 +01:00
Denys Vlasenko
4609f477c7
mdev: fix mode of dir1 in =dir1/dir2/file rule
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 01:22:12 +01:00
Bernhard Reutner-Fischer
20c5e5a626
mount: fix -o user=foo mishandling, fix unc= generation, add prefixpath=
...
function old new delta
singlemount 1019 1049 +30
packed_usage 29252 29257 +5
parse_mount_options 230 232 +2
mount_option_str 337 338 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 38/0) Total: 38 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17 02:30:35 +01:00
Martin Santesson
406ea15e2c
mount: add unc option to CIFS mount (needed for Linux 3.4+)
...
unc option for CIFS mount is mandatory after CIFS option parsing
was rewritten in Linux 3.4
Signed-off-by: Martin Santesson <martinsn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-16 00:47:19 +01: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
Peter Korsgaard
3917fa32dc
dmesg: handle multi-char log levels
...
Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length
record buffer), klog buffer can now contain log lines with multi-char
loglevel indicators (<[0-9]+>) - So we can no longer just skip 3 bytes.
Instead skip past the terminating '>' like util-linux does.
function old new delta
dmesg_main 266 280 +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-01-05 21:02:14 -05:00
Anthony G. Basile
12677acf0a
CONFIG_PID_FILE_PATH: new configuration option for pidfile paths
...
We set a default path for the directory where pidfiles are create
when FEATURE_PIDFILE is selected. The default has no effect on
applets which must specify a pidfile path on the command line to
run, and it can be overridden by applets which optionally allow
the user to specify the pidfile path.
We also add pidfile write/remove support for klogd, ntpd and watchdog.
For syslogd, we add a missing remove_pidfile() for better cleanup
on daemon exit.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-19 15:53:33 -05: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
Linus Walleij
b5c7220e7b
fbset: respect rgba configuration lines in fb.modes
...
The fbset utility would not respect "rgba" config entries in
the fb.modes file such as this (for the ARM Integrator/CP):
mode "640x480-60-clcd"
# D: 25.175 MHz, H: 31.469 kHz, V: 59.94 Hz
geometry 640 480 640 480 16
timings 39722 48 16 33 10 96 2
rgba 5/10,5/5,5/0,1/15
endmode
This is important especially for this ARGB5551 device which
is hopeless to configure otherwise. I noticed this lacking
feature after the TI "fbtest" program managed to set up the
the colormode correctly.
Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-07 19:58:15 +02:00
Eric Martin
5345b8db8b
acpid: add missing lid switch definition
...
This patch adds a missing LID0 switch definition.
Without it, closing the notebook lid is not detected by acpid.
Signed-off-by: Eric Martin <eric.martin@gmx.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-07 19:06:50 +02:00
Denys Vlasenko
9ad8979ff1
mount: support strictatime option. Closes 5240
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-26 16:09:00 +02:00
Denys Vlasenko
6ebb2b6b24
mount: do not pass "comment=ANYTHING" option to kernel. Closes 5240
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 15:17:18 +02:00
Denys Vlasenko
a396ade9f8
mount: undo recent breakage when mount flags were made unsigned
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 15:06:27 +02:00
Denys Vlasenko
c9a13116a4
mount: fix the wrongly stored fs creation time
...
This bug made our ext2 images non-mountable by ext4 driver.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 16:50:46 +02:00
Denys Vlasenko
9ee4266490
mount: set up RO loop device if mount -o ro. Closes 4784
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 12:08:56 +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
39f82d4309
rdate: code shrink
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-11 14:57:29 +02:00
Denys Vlasenko
93c32f2dd2
rdate: code shrink
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-11 02:06:11 +02:00
Christoph Lohmann
25cb5aae2b
mdev: tell kernel that we didn't find the firmware
...
function old new delta
mdev_main 797 801 +4
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-19 23:39:45 +02:00
Denys Vlasenko
aaf827203d
Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox
2012-05-19 22:37:07 +02:00
Denys Vlasenko
b6beada5a1
mdev: remove undocumented subsystem/devname matching hack
...
It was colliding with matching of devnames with slashes.
We need a more generic way to examine env.vars in rules anyway.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 15:11:16 +02:00
Denys Vlasenko
ea57f51819
mdev: when found, print major,minor into mdev.log
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 11:39:57 +02:00
Denys Vlasenko
8d11854678
tweak help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 04:47:18 +02:00
Denys Vlasenko
516530c932
mdev: add support for $DEVNAME and /dev/mdev.log debug aid
...
function old new delta
make_device 1843 2083 +240
mdev_main 712 804 +92
packed_usage 29236 29251 +15
keywords 288 19 -269
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 347/-269) Total: 78 bytes
text data bss dec hex filename
887506 497 7584 895587 daa63 busybox_old
887982 497 7584 896063 dac3f busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 04:45: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
c9665631d3
mdev: fix mode of creatred node if config file support is not configured
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-21 14:35:32 +02:00
Denys Vlasenko
56443cdbdd
whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-20 15:07:22 +02:00
Denys Vlasenko
d778e6c6f8
hwclock: fix wrong comparison of time value (when it will overlow int)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-17 19:25:13 +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
86a03bee1d
umount: make -d always active, add -D to suppress it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-17 13:07:28 +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
0687a5b496
libbb: make xchroot do a chdir("/") after chroot
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08 00:28:24 +01: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
817c230a0c
getopt: trim help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09 18:39:16 +01:00
Denys Vlasenko
594db1e62a
getopt: simple code shrink; expand help text
...
function old new delta
packed_usage 28978 29184 +206
getopt_main 656 632 -24
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09 18:17:29 +01:00
Denys Vlasenko
638dbc34b3
mdev: add a comment. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-06 01:00:00 +01:00
Denys Vlasenko
bbf1e3c144
acpid: do not install handlers for fatal signals
...
For acpid, it's ok to die at once.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-05 15:08:08 +01:00
Javier Viguera
e8758eaf4f
mdev: fix wrong sizeof
...
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30 02:15:13 +01:00
Denys Vlasenko
6e8861b5f1
*: better comments on termios manipulations. No code changes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15 23:00:13 +01:00
Denys Vlasenko
7550201e9a
mke2fs: do not zero out first kilobyte. Closes 3247
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11 01:02:31 +01:00
Denys Vlasenko
499597d6ef
mdev: do not treat non-leading '#' chars as start of comment. Closes 4676
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11 00:37:17 +01:00
Denys Vlasenko
982fdaf4b2
acpid: close fds which are reported as dead (POLLERR/POLLHUP/POLLNVAL) by poll.
...
function old new delta
acpid_main 1159 1229 +70
packed_usage 28977 28980 +3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-09 05:01:25 +01:00
Denys Vlasenko
d6f5000c13
*: style fixes. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-15 12:39:25 +01:00
Denys Vlasenko
2f8ccc14f7
blkid: make help text show [BLOCKDEV]...
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-06 15:09:27 +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
39b233182c
mount: resolve hosts to IPs in nfs mounts
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-10 17:01:39 +01:00
Denys Vlasenko
a86e02492d
mount: make FEATURE_MOUNT_NFS not needed for Linux 2.6.23+
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-10 16:53:35 +01:00
Dave Love
fae473c81b
mount: support -o noacl
...
Signed-off-by: Dave Love <fx@gnu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-10 15:19:25 +01:00
Karol Lewandowski
b5ebe5fdb3
mount: handle list of comma-separated fs types in -t option
...
Allows one to specify list of filesystem types to be
tried when mounting particular device. E.g.
mount -t vfat,ext2 ...
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-03 10:02:31 +01:00
Denys Vlasenko
f85554c265
mount: free commented /etc/filesystems lines when we read it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-03 09:54:53 +01:00
Denys Vlasenko
a241069004
remove duplicate include <sys/swap.h>
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-22 06:39:00 +02:00
Denys Vlasenko
45f0a1156d
mdev: trim overlong comments. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 04:55:47 +02:00
Denys Vlasenko
3eccd7ecbe
mdev: don't reparse rules on -s
...
function old new delta
make_device 1648 1843 +195
clean_up_cur_rule - 61 +61
make_default_cur_rule - 41 +41
mdev_main 690 712 +22
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 319/0) Total: 319 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 03:46:30 +02:00
Denys Vlasenko
16714245f9
add INIT_G()'s. No code changes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-21 01:59:15 +02:00
Denys Vlasenko
5c6ba6c56f
mdev: expand --help so that it's actually useful.
...
function old new delta
packed_usage 28634 28822 +188
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-19 12:18:11 +02:00
Denys Vlasenko
13e709c53f
losetup: implement -r option. Closes 4033.
...
function old new delta
packed_usage 28595 28633 +38
losetup_main 285 290 +5
singlemount 906 908 +2
set_loop 674 672 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-12 08:30:16 +02:00
Denys Vlasenko
c21c310e46
swapoff: dont pass "p" in opt_complementary
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13 23:36:36 +02:00
Denys Vlasenko
b347df9131
randomconfig fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-09 22:49:15 +02:00
Denys Vlasenko
80856b37e8
fdisk: reinstate a short sleep between sync() and ioctl(BLKRRPART)
...
While at it, simplify code a bit.
function old new delta
write_table 201 198 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-13 09:06:32 +02:00
Denys Vlasenko
14bd16ac56
more tweak for bionic
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 08:49:40 +02:00
Denys Vlasenko
319b8bb355
hwclock: use locale-specific date output format
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 06:40:25 +02:00
Dan Fandrich
b5de0c12d6
typo fixes
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 05:47:49 +02:00
Denys Vlasenko
46465ecf72
hwclock: better help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-04 04:34:57 +02:00
Denys Vlasenko
972e046070
fbset: apply modelines. Closes 3823
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-06 04:21:39 +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
Dan Fandrich
f3854f789c
replace nonstandard unsigned typedefs
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03 20:25:17 +02:00
Denys Vlasenko
488dd70869
fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775
...
When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries
to include getopt.h which is not available; for example with uClibc
when !UCLIBC_HAS_GETOPT_LONG. getopt.h is only required
for the _long set of functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 04:24:52 +02:00
Denys Vlasenko
4566e172eb
simplify parsing of /etc/busybox.conf
...
function old new delta
parse_config_file 799 667 -132
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-16 00:01:08 +02:00
Denys Vlasenko
12bc152b31
fbset: abort on unknown options. closes 3121
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 03:57:27 +02:00
Denys Vlasenko
80c5b6893d
libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:21:10 +02:00
Bernhard Reutner-Fischer
882062915d
mount: for NFS use tcp per default rather than udp
...
nfs-utils's mount.nfs uses TCP per default unless explicitly asked for
otherwise. This is also the expected behaviour for NFSv4, so ok there,
too.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-04 19:03:30 +02:00
Lauri Kasanen
9cfcc4d7a2
fdisk: backport disk check from util-linux
...
With the digit check devices like mmcblk0 were skipped,
but now with 0 allowed we're seeing a ton of loop devices listed
(loop0, loop10, loop20...) as well as ramzswap0,
all which should not be shown in fdisk -l.
function old new delta
list_devs_in_proc_partititons 157 238 +81
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-30 21:31:05 +02:00
Denys Vlasenko
8c498b6c6e
make FDISK_SUPPORT_LARGE_DISKS redundant when LFS=y
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 18:07:35 +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
Roman Borisov
19311bfa7b
mount: add --rbind option support
...
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-26 23:12:12 +01:00
Roman Borisov
d3679d2491
mount: rprivate option fix
...
fixed the mistake in writing for -make-rprivate option
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-26 23:02:05 +01:00
Denys Vlasenko
681efe20d3
use user's shell instead of hardwired "/bin/sh" (android needs this)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:00:36 +01:00
Denys Vlasenko
82e785cf8c
more: fix tabs handling
...
function old new delta
more_main 837 829 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07 02:01:52 +01:00
Denys Vlasenko
c6450c974f
mount: strip multiple trailing slashes, not just one
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-28 11:09:49 +01:00
Roman Borisov
c8dc01dc80
mount: update /etc/mtab properly on mount --move
...
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-28 05:06:01 +01: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
Peter Korsgaard
301fe50ca2
mount: ignore unknown mount options when remounting NFS mounts
...
Don't fail on unknown nfs mount options. The kernel automatically
adds a few mount options that we don't currently handle, like:
sec=null|sys|krb5..
mountaddr=<ip>
mountproto=tcp|udp
local_lock=none|all|flock|posix
Which causes a simple mount -o remount,rw <mountpoint> to fail.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 19:02:36 +01:00
Roman Borisov
945fd173e9
mount: fix wrong long option namess
...
Fixed the --make-shared, --make-rshared, ... etc. (--make-*) options
in the mount command. Now parse_mount_options() may reasonably process such
options.
Fixed: http://lists.busybox.net/pipermail/busybox/2011-January/074511.html
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 18:50:55 +01:00
Dan Fandrich
f303bdd918
blockdev: add --getsz to replace --getsize
...
function old new delta
blockdev_main 255 273 +18
bdcommands 160 176 +16
packed_usage 28142 28107 -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-35) Total: -1 bytes
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-20 04:15:43 +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
66c5b12dbf
ash: fix TMOUT not restoring tty attributes
...
function old new delta
pgetc 420 500 +80
readtoken1 3202 3239 +37
read_line_input 3316 3337 +21
udhcpc_main 2610 2630 +20
file_get 266 272 +6
expandarg 958 963 +5
localcmd 257 259 +2
addLines 85 87 +2
read_line 94 95 +1
ed_main 2540 2541 +1
timed_out 1 - -1
lineedit_read_key 256 255 -1
alrm_sighandler 44 - -44
cmdloop 539 434 -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151) Total: 24 bytes
text data bss dec hex filename
887379 936 17200 905515 dd12b busybox_old
887411 936 17192 905539 dd143 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08 05:07:02 +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
625cfd87d9
fdisk_osf: simplify ifdef (incidentally, adds support for Microblaze)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-31 05:55:52 +01:00
Davide Cavalca
658a437d4b
hwclock: implement --systz
...
function old new delta
hwclock_main 324 434 +110
packed_usage 28220 28259 +39
static.hwclock_longopts 53 60 +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 156/0) Total: 156 bytes
Signed-off-by: Davide Cavalca <davide@geexbox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 18:55:32 +01:00
Denys Vlasenko
b9f2d9f7d9
mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
3b5acaa432
disable automatic selection of FEATURE_SUID; improve its help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:52:48 +01:00
Denys Vlasenko
e66a212081
mkswap: selinux build fix
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-05 11:45:44 +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
0d1d0f6e54
more: smaller version of previous fix
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-13 14:31:59 +01:00
Denys Vlasenko
0b90de1537
more: exit if write to stdout errors out
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-13 14:28:38 +01:00
Denys Vlasenko
b271ad46dc
blkid: add TODO
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-25 07:59:17 +01:00
Denys Vlasenko
26777aa1c6
fixes for bugs discovered by randomconfig builds and tests
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22 23:49:10 +01:00
Rob Landley
2658888c78
umount: cleanup and code shrink
...
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-01 00:43:34 +01:00
Denys Vlasenko
d7559c2741
fdisk: fix trivial build failure
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30 02:40:08 +02:00
Denys Vlasenko
fb132e4737
whitespace cleanup
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Marek Polacek
7b18107384
*: use _exit() in sighandlers; showkey: do not use exit-thru-sighandler
...
While at it, make ESC sequences more readable; and removed check for
isatty(stdin) in reset. Code shrink:
text data bss dec hex filename
884771 936 17216 902923 dc70b busybox_old
884723 936 17216 902875 dc6db busybox_unstripped
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 21:34:56 +02:00
Denys Vlasenko
756e95e782
ipcrm: small code shrink
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 19:10:46 +02:00
Denys Vlasenko
e4dcba1c10
*: whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
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
Denys Vlasenko
16cc80e989
crc32: cleanups, no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 05:38:11 +02:00
Denys Vlasenko
9ce642f974
libbb: introduce and use common crc32 routine
...
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>
2010-10-27 15:26:45 +02:00
Marek Polacek
b507cc3ace
powertop: new applet
...
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 03:44:34 +02:00
Kevin Cernekee
ccb070450e
fdisk: initial stab at GPT partition support
...
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 02:00:24 +02:00
Denys Vlasenko
ba04337e1f
umount: I forgot to change another PATH_MAX to 4096
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 13:28:45 +02:00
Denys Vlasenko
07b1c6ecc0
umount: do not (ab)use PATH_MAX as mntent buffer size
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:00:57 +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
f04ca74ab5
dmesg: more correct skipping of <N>; use faster putchar for most output
...
function old new delta
dmesg_main 246 291 +45
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-19 23:08:33 +02:00
Souf Oued
ccb7a43900
acpid: add config file and map file
...
function old new delta
acpid_main 434 1137 +703
find_action - 204 +204
f_evt_tab - 48 +48
packed_usage 27724 27755 +31
f_act_tab - 16 +16
process_event 126 - -126
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/0 up/down: 1002/-126) Total: 876 bytes
Signed-off-by: Souf Oued <souf_oued@yahoo.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-26 12:40:05 +02:00
Denys Vlasenko
f38b912fcf
Again fix license line format
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 17:41:46 +02:00
Denys Vlasenko
571c5ab768
blockdev: code shrink
...
function old new delta
blockdev_main 292 255 -37
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 17:37:52 +02:00
Denys Vlasenko
a35dfe6200
blockdev: make "blockdev --rereadpt /dev/sda EXTRA_ARG" complain. +6 bytes.
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 16:31:18 +02:00
Denys Vlasenko
3d4a8f8646
made 3 license strings to follow the usual form ("or later" bit is not changed!)
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 16:22:25 +02:00
Denys Vlasenko
264bdadb2c
blockdev: -2 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 15:34:15 +02:00
Denys Vlasenko
b4e6b41934
tweak blockdev's help text
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 14:15:46 +02:00
Sergey Naumov
289aff8623
blockdev: new applet
...
function old new delta
blockdev_main - 287 +287
bdcommands - 160 +160
packed_usage 27203 27298 +95
applet_names 2297 2306 +9
applet_main 1352 1356 +4
applet_nameofs 676 678 +2
applet_install_loc 169 170 +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 5/0 up/down: 558/0) Total: 558 bytes
Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 13:35:58 +02:00
Denys Vlasenko
8d3e225a2d
libbb: add xfstat function
...
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>
2010-08-31 12:42:06 +02:00
Denys Vlasenko
4e7dd3c363
mkswap: clear 1st kilobyte. Closes bug 1831
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-31 01:50:03 +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