Adds "Enable getopt long" under "General options", default y.
Send patches to fix getopt_ulflags and run_parts.c if you turn this off..
See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
hdparm has a uint64_t passed to printf with a %llu format (which is ok, because
it's the same size), but without first being casted(?) to unsigned long long int.
Which is kinda funny because it's done OK on a few lines above...
Remove -v verbose -V version -q quiet flags
Remove parse_opt_v2();
Rename parse_opt_v3() to parse_xfermode()
Remove if_strcat()
Rearrange code in dump_identity() to reduce size
Modify some strings so that they could be optimized by the compiler
Minor code clean up
Remove unneeded #define <shm.h>
#if BB_BIG_ENDIAN && !defined(__USE_XOPEN)
# define __USE_XOPEN
#endif
Must be before #include <unistd.h> and #include "busybox.h"
(noticed by Bernhard Fischer <rep.nop@aon.at>)
Remove duplicate code in do_time()
in 2.4 (it fetched the same hd_geometry struct only with uint cylinders instead
of ushort cylinders: nothing that big has ever accurately reported gemoetry,
it's all LBA.
Also stop declaring the hd_geometry struct static: it's two chars, a short, and
a long for a grand total of 8 bytes. That can go on the stack.
Make hdparm smaller:
* Make bb_ioctl return the status
* Replace ioctl with bb_ioctl in a few places
* Add bb_ioctl_alt, use where appropriate (four places)
* unsigned char args1[4+512] = {WIN_IDENTIFY,0,0,1,};
ate 0.5k of rodata, fix that
things down a bit, fixed a number of funky corner cases, added support for
several new features (things like mount --move, mount --bind, lazy unounts,
automatic detection of loop mounts, and so on). Probably broke several
other things, but it's fixable. (Bang on it, tell me what doesn't work for
you...)
Note: you no longer need to say "-o loop". It does that for you when
necessary.
Still need to add "user mount" support, which involves making mount suid. Not
too hard to do under the new infrastructure, just haven't done it yet...
The previous code had the following notes, that belong in the version
control comments:
- * 3/21/1999 Charles P. Wright <cpwright@cpwright.com>
- * searches through fstab when -a is passed
- * will try mounting stuff with all fses when passed -t auto
- *
- * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab.
- *
- * 1999-10-07 Erik Andersen <andersen@codepoet.org>.
- * Rewrite of a lot of code. Removed mtab usage (I plan on
- * putting it back as a compile-time option some time),
- * major adjustments to option parsing, and some serious
- * dieting all around.
- *
- * 1999-11-06 mtab support is back - andersee
- *
- * 2000-01-12 Ben Collins <bcollins@debian.org>, Borrowed utils-linux's
- * mount to add loop support.
- *
- * 2000-04-30 Dave Cinege <dcinege@psychosis.com>
- * Rewrote fstab while loop and lower mount section. Can now do
- * single mounts from fstab. Can override fstab options for single
- * mount. Common mount_one call for single mounts and 'all'. Fixed
- * mtab updating and stale entries. Removed 'remount' default.
- *
presumably be removed eventually (use udev), but as long as it's in there.
Tito says:
The sense of this patch is to call:
read_config_file_err:
#ifdef CONFIG_DEVFSD_VERBOSE
msg_logger(((optional == 0 ) && (errno == ENOENT))? DIE : NO_DIE, LOG_ERR, "read config file: %s: %m\n", path);
#else
if(optional == 0 && errno == ENOENT)
exit(EXIT_FAILURE);
#endif
just after the failure of the call that set errno ( stat and fopen)
to avoid false error messages.
with tweaks from Mike Frysinger and Rob Landley.
Note: this will still fail to umount a path that contains an ' or \ character.
Is it worth the extra size to filter for that?
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
dev_t. This is especially important now that the user space concept of a dev_t
and the kernel concept of a dev_t are divergant. The only bit of user space
allowed to know the number of major and minor bits is include/sys/sysmacros.h
(i.e. part of libc). When used with a current C library and a 2.6.x kernel,
this fix should allow BusyBox to support wide device major/minor numbers.
-Erik
1) a non NULL terminated buffer that can mess up output, spotted by Ian
Latter
2) in miscutils/strings.c: get rid of useless pointer dereference in
third part of for(;;), spotted by Larry Doolittle
3) bug when reading from a pipe and being invoked as strings
"cat Readme | strings" is broken
"cat Readme | busybox strings" works
spotted by Ian Latter and fixed by Tito.
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.
Erik - please apply.
Authors - please check that I didn't corrupt any meaning.
Package importers - see if any of these changes should be
passed to the upstream authors.
I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.
What is "pretect redefined for test" in cmdedit.c?
Good luck on the 1.00 release!
- Larry
Hi to all,
I discovered a little bug in hdparm.c
(really two little bugs...I've made...sigh! Mea culpa).
Some vars were modified only locally and this could lead to wrong
results to be displayed with the -I switch and maybe with others.
Attached is a patch that fix it ( +88b).
Also attached is second patch that reduces the size a little bit:
text data bss dec hex filename
27984 624 900 29508 7344 hdparm.o (without bug-fix)
28072 624 900 29596 739c hdparm.o (with bug-fix)
28141 624 900 29665 73e1 hdparm.o (original)
but maybe this one can wait as we are in a feature freeze.
Ciao,
Tito
Hi to all,
here is a new patch for bb's devfsd. The news are:
1) Size reduction for the basic setup with no options compiled in from :
text data bss dec hex filename
10591 392 543 11526 2d06 devfsd.o
rw-r--r-- 1 root root 18536 Dec 18 21:52 devfsd.o
to:
text data bss dec hex filename
9303 392 543 10238 27fe devfsd.o
rw-r--r-- 1 root root 16528 Dec 18 22:02 devfsd.o
With this setup you should not expect much output from devfsd
( just at start or with -v) and if some error occurs it only exits 1.
To have more output enable: " Increases logging (and size)" (+1568 b).
2) The option "Adds function names to program output" was removed from config menu
and now to enable debug output you can use bb's standard option:
"Build BusyBox with Debugging symbols".
Be careful as with this option enabled a lot of data are outputted to /dev/log and/or to stderr.
3) A new option: "Enables the -fg and -np option" was added to config menu (+128 b).
BTW: option "Adds support for MODLOAD keyword in devsfd.conf" adds 268 b.
4) The following keywords in devsfd.conf are supported:
"CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE",
"PERMISSIONS", "EXECUTE", "COPY", "IGNORE", "MKOLDCOMPAT",
"MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT".
But only if they are written UPPERCASE!!!!!!!!
5)Help text in usage.h was modified.
6)Something that I have forgotten..........
I've tested this for the last week on my box and it seems to work as expected.
Thanks in advance and please apply.
Ciao,
Tito