Mike Frysinger
c881c733bb
cleanup comments and coding style and rewrite the mdev.conf parser to use common busybox functions and call strdup() less often ... saves a ~few hundred bytes
2007-11-19 09:04:22 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
dc757aa16c
introduce and use bb_basename()
...
function old new delta
bb_basename - 26 +26
sv_main 1226 1225 -1
passwd_main 1985 1983 -2
showdirs 482 478 -4
sendCgi 1811 1807 -4
make_device 1354 1350 -4
handleIncoming 2443 2439 -4
func_name 82 78 -4
service_name 2292 2285 -7
main 909 901 -8
cmp_main 555 547 -8
test_main 434 422 -12
act 228 216 -12
find_pair 180 164 -16
rmmod_main 298 280 -18
find_pid_by_name 156 134 -22
modprobe_main 1606 1576 -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes
text data bss dec hex filename
734933 3028 14400 752361 b7ae9 busybox_old
734801 3028 14400 752229 b7a65 busybox_unstripped
2007-06-30 08:04:05 +00:00
Bernhard Reutner-Fischer
bb0baed564
- strndupa is a GNU extension. Using strdup to avoid several errors like:
...
util-linux/mdev.c:(.text+0x29a): undefined reference to `strndupa'
2007-06-20 09:56:47 +00:00
Mike Frysinger
0e0639b702
Alex Landau writes: open firmware for reading, not writing
2007-06-14 09:29:48 +00:00
Mike Frysinger
b51fd3525e
as suggested by Renaud Cerrato and Souf, switch over to recursive_action() for some nice shrinkage and so we work even when CONFIG_SYSFS_DEPRECATED is off
2007-06-13 09:24:50 +00:00
Mike Frysinger
a78ef2ccf1
add support for firmware loading
2007-06-13 07:34:15 +00:00
Denis Vlasenko
d6766c71a9
mdev: microscopic enhancement, should change nothing
2007-06-08 16:18:15 +00:00
Denis Vlasenko
4e5f82c76f
find_stray_communal_vars: script which finds communal variables
...
resize: remove globals var
mdev: remove globals var
2007-06-03 22:30:22 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Bernhard Reutner-Fischer
febe3c4211
- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"
2007-04-04 20:52:03 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
cf749bc10c
small fixes:
...
fix xstrdup to not grossly overallocate memory
use xopen instean of xopen3 in several places
etc.
2006-11-26 15:45:17 +00:00
Denis Vlasenko
f46be09106
mdev: reduce excessive indentation
2006-10-16 19:39:37 +00:00
Denis Vlasenko
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +00:00
Denis Vlasenko
9275814a9e
lots of silly indent fixes
2006-10-03 19:56:34 +00:00
Denis Vlasenko
a959588b80
Yet another silly little byte saving. couldn't -> cannot
2006-09-29 21:30:43 +00:00
Rob Landley
e9a7a6212b
Change license statements (and clean up headers) on some of the files that
...
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
Denis Vlasenko
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Rob Landley
10b36f94bb
Patch from Chris Steel to fix mdev deleting device nodes.
2006-08-10 01:09:37 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
"Robert P. J. Day"
63fc1a9e08
Standardize on the vi editing directives being on the first line.
2006-07-02 19:47:05 +00:00
Rob Landley
ef10d52745
Upgrade mdev to allow commands to be run on create/delete.
...
Both Jason Schoon and Giuseppe Ciotta deserve credit for this, I used elements
of both. It's been upgraded so that you can specify that a given command
should run at create, at delete, or at both using different special characters
(@, $, and * respectively). It uses the system() method of running command
lines which means you can use environment variables on the command line (it
sets $MDEV to the name of the current device being created/deleted, which is
useful if you matched it via regex), and the documentation warns that you need
a /bin/sh to make that work, so you probably want to pick a default shell.
2006-06-26 14:11:33 +00:00
Rob Landley
0960ca7383
Work around a persistent uClibc bug, since 0.9.29 still hasn't shipped.
...
Poked to do this by Jason Schoon.
2006-06-13 18:27:16 +00:00
Rob Landley
5cd1ccd995
Convert to a global struct, the way sed was. Now I have two, I can work out
...
the infrastructure to merge global structs into a union...
2006-05-21 18:33:27 +00:00
Rob Landley
15fe2e11d7
Shrink the code about 50 bytes, allocate less run-time memory, and add a
...
comment that null terminating the string we sscanf() shouldn't be required
since the kernel adds \n to the end of it and sscanf will stop there.
2006-05-08 02:53:23 +00:00
Rob Landley
a7e3d05208
Create /dev/root symlink pointing to real root device, if any.
2006-02-21 06:11:13 +00:00
Mike Frysinger
271aa40a15
add back in path nulling after calling find_dev() since it is needed for now ...
2006-02-07 06:10:45 +00:00
Mike Frysinger
a421ba8203
cleanup style ... just because you use less spaces doesnt mean the resulting code is smaller
2006-02-03 00:25:37 +00:00
Mike Frysinger
248d2220f9
shrink the code a bit
2006-02-03 00:19:42 +00:00
Mike Frysinger
53d57dbe6b
gavinl writes in Bug 661:
...
if read() file return less than 1, we should close the fd and then goto end.
2006-02-03 00:16:53 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Rob Landley
e927743bb0
There was a missing ! on strcmp (despite the fact it worked in my testing,
...
I have no idea _how_), and a simpler fix for the extra \n problem. I tested
this and it worked for me, for what that's worth...
2006-01-22 23:14:16 +00:00
Rob Landley
29e08ffcdf
Frank Sorenson added hotplug support to mdev. (I tweaked it a bit. Need
...
to come up with a test suite for all the stuff that requires root access.
Something involving User Mode Linux or QEMU, probably...)
2006-01-12 06:13:50 +00:00
Rob Landley
1c19deed17
The major:minor read from dev ends with \n, need to trim that.
2006-01-12 03:07:49 +00:00
Mike Frysinger
5990efb795
use MAP_PRIVATE instead of MAP_SHARED for uClinux systems (see Bug 550)
2006-01-04 07:31:19 +00:00
Rob Landley
9bdd742dd2
Sigh. Left the debug path in. Fixed.
2005-12-17 10:54:17 +00:00
Rob Landley
b56c285da5
Added /etc/mdev.conf support. Adds about 1.9k to mdev.
2005-12-17 10:52:30 +00:00
Rob Landley
70f7ef7be3
Nothing to see here. Move along.
...
Not buying it, eh?
I know I said new features before 1.1, but, well... (I was weak!)
The config file and hotplug modes aren't implemented yet. Might take a stab at
those tomorrow. (I _should_ go back to focusing on the bug triage list.)
2005-12-13 08:21:33 +00:00