Commit Graph

6238 Commits

Author SHA1 Message Date
Denis Vlasenko
13b4924ce0 mount: style fixes 2006-09-17 15:04:35 +00:00
Denis Vlasenko
3bc59aa2a4 mount: fix bugs: free(mp->mnt_fsname) of non-malloced ptr;
check for "more than 2 arguments" was actually checking for -2.
2006-09-17 15:04:01 +00:00
Denis Vlasenko
fc56dd2e21 mount: use bb_simplify_path as appropriate 2006-09-17 15:01:53 +00:00
Denis Vlasenko
8d474b5009 mount: style fixes 2006-09-17 15:00:58 +00:00
Denis Vlasenko
66fabdb631 login: apply fixes + getopt_ulflag'ification by Bernhard 2006-09-17 14:45:09 +00:00
Bernhard Reutner-Fischer
4d0f54af94 - Steven Scholz pointed out that ssd's make-pid doesn't take an argument. 2006-09-15 19:25:18 +00:00
Denis Vlasenko
30a64cdc95 mount: reorder things, fix NFS-less mount. 2006-09-15 15:12:00 +00:00
Rob Landley
215c61d3c2 Unbreak allbareconfig. 2006-09-15 04:10:05 +00:00
Rob Landley
f5fc1384e9 So, in the cornucopia of superfulous warning directives I didn't add to the
tree, we have the warning about failed inlines (which with our inline
limit set to zero means any usage of the "inline" keyword at all).  Note
that setting the inline limit to zero, and using -Werror, both predated
adding the warning about inlines to the tree.  So whatever checkin added
that did nothing but break the tree.  But oh well.

The second category of superfluous warnings is warning about functions with
no previous declaration.  Apparently, if you add ALWAYS_INLINE to an empty
function definition, it considers the sucker undeclared as far as the
warning is concerned.  (I.E. it's a buggy warning.  I try not to ask the
compiler to generate warnings it can't competently generate.)

This is why I removed "inline" (unbreak allbareconfig), and couldn't replace it
with "ALWAYS_INLINE" (still broke allbareconfig).
2006-09-15 04:08:25 +00:00
Rob Landley
69115c656d Unbreak allbareconfig.
We've had -Werror in the tree for quite a while, so adding #warning
somewhat counterproductve way to make comments on the code that belong on the
mailing list anyway.
2006-09-15 04:01:03 +00:00
Rob Landley
da9d1d079e Strangely, using // in the comments I added was not a persistent accident. 2006-09-14 19:52:07 +00:00
Denis Vlasenko
7ccf5cc064 login: eliminate forward decls and #ifdefs 2006-09-14 17:03:18 +00:00
Denis Vlasenko
af9854b81a umount: do not try to close FILE* which is NULL. 2006-09-14 16:40:46 +00:00
Denis Vlasenko
be507170eb mount: -o remount should not add lines to /etc/mtab 2006-09-14 16:09:27 +00:00
Denis Vlasenko
25098f7fd5 mount: move code from nfsmount.c into mount.c 2006-09-14 15:46:33 +00:00
Bernhard Reutner-Fischer
6eb2f8edce - make sure that the 'build' dir exists even if we are about to build just one applet. 2006-09-14 15:07:48 +00:00
Bernhard Reutner-Fischer
1d6fb6d448 - do away with silly comment and do the Right Thing wrt building the archives.
You have to provide the absolute path to the objdir/target.ext you want to build, as can be seen in the respective makefiles..
2006-09-14 15:04:31 +00:00
Denis Vlasenko
727ef94447 mount: fix mtab support (but it is still rather buggy) 2006-09-14 13:19:19 +00:00
Rob Landley
85c6de71bf svn 15355 replaced "BusyBox is licensed under the GNU General Public Public
License" with "BusyBox is licensed under the GNU General Public
License version 2 or later... (This is the same license the Linux kernel
is under...)"  Except that the Linux kernel isn't under GPLv2 or later,
it's just under GPLv2.

Now they match again.
2006-09-14 05:59:32 +00:00
Rob Landley
cc9962d7fb More code from kernel developers, and therefore licensed under GPLv2 only.
Clarify the license boilerplate.

On an unrelated note, this could use busyboxification.  check_mount() looks
reusable and ask() is generic...
2006-09-14 05:27:28 +00:00
Rob Landley
73810e8d42 Add Larry Doolittle's ntpclient, plus some formatting tweaks. 2006-09-13 19:54:36 +00:00
Bernhard Reutner-Fischer
7fee0c4357 - fix copy'n paste errors that got introduced when switching to the shorter boilerplate.
No object code changes.
2006-09-13 16:39:19 +00:00
Bernhard Reutner-Fischer
92582f2e11 - r16075 broke for de-selected FEATURE_UTMP; Partial fix that wants some more cleanup (see FIXME in the patch). 2006-09-13 15:42:47 +00:00
Rob Landley
577905f1e4 Revert duplicate patch.
I don't know why patch decided to apply this even though it was already in
the tree.  I thought the other hunks failed because they were totally
unrelated leakage from Bernhard's tree (which they are; was the a reason
for bundling them in with this fix?  Do they have something to do with
the GCC 2.95 fix?  I suspect they prevent me from backporting this
patch to 1.2.2 because the header consolidation into libbb.h hadn't
been done yet, and no I'm not fixing it up: if that's the case then
this patch won't be in 1.2.2 due to extraneous changes bundled with it that
prevent a clean backport without rolling a new patch).
2006-09-12 22:42:03 +00:00
Rob Landley
20cc6d567f Remove pointless "const". Bloatcheck says 0 bytes difference. 2006-09-12 21:42:17 +00:00
Rob Landley
1b2b5cfba8 Fix from Bernhard for somebody trying to limp along with gcc 2.95.4. 2006-09-12 20:29:22 +00:00
Rob Landley
16bbb20089 Random cleanup hanging around my tree. 2006-09-12 20:28:34 +00:00
Bernhard Reutner-Fischer
b5f50ea344 - small trivia to be gentle to gcc-2.95.x which had no va_copy but only __va_copy. 2006-09-12 13:27:55 +00:00
Bernhard Reutner-Fischer
428a5cd0d3 - fix warning about discarding qualifiers in initialization 2006-09-12 13:25:16 +00:00
Denis Vlasenko
00d7d6cef6 nfsmount: sanitize it. It had a rather peculiar idea of implementing "bg"
option - it was going to return a special flag back to caller and
expecting caller to call it again with special parameter! Also
caller was charged with calling mount() syscall...

mount: mtab support was non-functional. Enabling it revealed serious bug
which is not fixed yet.
2006-09-11 17:42:44 +00:00
Bernhard Reutner-Fischer
64d7e93081 - convert a few xopen3(,,0) into xopen(,). Also peruse the fact that xopen defaults to 0777 on it's own, so we don't need to xopen3(,,0777).
Saves a few bytes:
$ size busybox.old busybox                                text    data     bss     dec     hex filename
 839676    8780  243592 1092048  10a9d0 busybox.old
 839660    8780  243592 1092032  10a9c0 busybox
$ make CC=gcc-4.2-HEAD bloatcheck
function                                             old     new   delta
static.vconfig_main                                  281     279      -2
static.rx_main                                      1076    1074      -2
static.mt_main                                       294     292      -2
static.gzip_main                                     753     751      -2
static.mkfs_minix_main                              4034    4030      -4
static.unzip_main                                   1771    1766      -5
static.crontab_main                                 1513    1507      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-23)             Total: -23 bytes
2006-09-11 16:01:40 +00:00
Bernhard Reutner-Fischer
57b56674a3 - merge xstat.c into xfuncs.c 2006-09-11 09:18:09 +00:00
Bernhard Reutner-Fischer
dea6e3d3cf - Tito pointed out that Rob forgot to add e2fsprogs/blkid/list.c 2006-09-11 09:16:12 +00:00
Rob Landley
49ea46667f Build fixes for gcc 4.0 with -Werror, from Tito. 2006-09-11 01:34:21 +00:00
Rob Landley
69674941dd Error reporting fix for sulogin, plus remove help entries for options we never
implemented.  (Plus a bit more of bbsh leaking in from my tree, but it
shouldn't hurt anything and I'm lazy...)
2006-09-11 00:34:01 +00:00
Denis Vlasenko
3077294615 nfsmount: remove some really old code (for kernels 1.x!) + small cleanups. 2006-09-10 18:48:16 +00:00
Denis Vlasenko
d2b13eab98 nfsmount: delete nfsmount.h 2006-09-10 18:40:18 +00:00
Denis Vlasenko
39e93cc951 nfsmount: nfsmount.h merged into nfsmount.c 2006-09-10 18:38:17 +00:00
Denis Vlasenko
2244a21a8e nfsmount: style fix 2006-09-10 18:28:23 +00:00
Denis Vlasenko
5983914c1b ipcs: silly trick with strings. saves ~200 bytes. 2006-09-10 18:26:51 +00:00
Rob Landley
1bfca7bac7 Cleanup headers and replace the zero padding with an even smaller version.
One of the pads turned out to be unnecessary: sizeof(struct TarHeader) is
TAR_BLOCK_SIZE, the padding's in the struct.  The others could be done inline
with bb_common_bufsiz1.

This is a cleanup I did to Denis' patch long ago, but got sidetracked by
what turned into svn 15660.
2006-09-10 03:20:37 +00:00
Denis Vlasenko
9852d5a1e6 sulogin: minor cleanup. 2006-09-09 14:00:58 +00:00
Denis Vlasenko
8fafacd7ec setkeycodes: something horrible happened here
to indentation... fixed now
2006-09-09 13:23:04 +00:00
Denis Vlasenko
42dfcd2612 top: fixed wrong comment, made error message more clear 2006-09-09 12:55:02 +00:00
Denis Vlasenko
0c45bb23d2 tar: fix "xopen with O_CREAT" warning, improve zero padding write
(was doing zillions of 1-byte write syscalls)
2006-09-09 12:49:03 +00:00
Denis Vlasenko
d5d614c5f4 xopen3(O_RDONLY) -> xopen(O_RDONLY). 2006-09-09 12:25:20 +00:00
Denis Vlasenko
9cac521f07 using [xa]sprintf for string concatenation is neat and saves
~100 bytes according to bloatcheck. Also this fixes bug in rpm
2006-09-09 12:24:19 +00:00
Denis Vlasenko
3526a1320a wget: wrap one atrociously long line (around 200 chars long!). 2006-09-09 12:20:57 +00:00
Denis Vlasenko
d797fcd726 udhcp: FEATURE_UDHCP_SYSLOG should be selected only if
udhcp[cd] really are going to use it.
2006-09-09 12:18:46 +00:00
Denis Vlasenko
2f50aa42c5 login: use some ideas from util-linux's login.
O_NONBLOCKing output on login timeout.
fchmod instead of chmod (latter is racy).
is_my_tty() is not needed anymore after race is fixed
(is_my_tty() was racy too anyway...).
2006-09-08 17:56:52 +00:00