Commit Graph

583 Commits

Author SHA1 Message Date
3ccc100670 ipcs: fix output (misaligned columns) 2006-09-19 17:43:56 +00:00
c7b9bad519 ipcs: getopt_ulflag'ification, -170 bytes 2006-09-19 17:40:31 +00:00
85f9e32f7f mount: fstabname needs to be const char* 2006-09-19 14:14:12 +00:00
23514fe251 mount: fix warning (printf field width of * wants int, not size_t) 2006-09-19 14:07:52 +00:00
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
a6127aacef mount: style fixlet 2006-09-17 15:51:52 +00:00
029c469934 mount: revert mount --bind to using "bind" as fstype. 2006-09-17 15:39:22 +00:00
a52145a927 mount: mount_it_now() - char *dir is not really needed. 2006-09-17 15:09:48 +00:00
c889d2b786 mount: fix "duplicate mount options in mtab" bug 2006-09-17 15:08:12 +00:00
c0975199be mount: nfs_strerror's static buffer was bigger than needed. 2006-09-17 15:06:34 +00:00
9c99b62b9e mount: getopt_ulflag'ification 2006-09-17 15:05:31 +00:00
13b4924ce0 mount: style fixes 2006-09-17 15:04:35 +00:00
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
fc56dd2e21 mount: use bb_simplify_path as appropriate 2006-09-17 15:01:53 +00:00
8d474b5009 mount: style fixes 2006-09-17 15:00:58 +00:00
30a64cdc95 mount: reorder things, fix NFS-less mount. 2006-09-15 15:12:00 +00:00
af9854b81a umount: do not try to close FILE* which is NULL. 2006-09-14 16:40:46 +00:00
be507170eb mount: -o remount should not add lines to /etc/mtab 2006-09-14 16:09:27 +00:00
25098f7fd5 mount: move code from nfsmount.c into mount.c 2006-09-14 15:46:33 +00:00
727ef94447 mount: fix mtab support (but it is still rather buggy) 2006-09-14 13:19:19 +00:00
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
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
20cc6d567f Remove pointless "const". Bloatcheck says 0 bytes difference. 2006-09-12 21:42:17 +00:00
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
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
3077294615 nfsmount: remove some really old code (for kernels 1.x!) + small cleanups. 2006-09-10 18:48:16 +00:00
d2b13eab98 nfsmount: delete nfsmount.h 2006-09-10 18:40:18 +00:00
39e93cc951 nfsmount: nfsmount.h merged into nfsmount.c 2006-09-10 18:38:17 +00:00
2244a21a8e nfsmount: style fix 2006-09-10 18:28:23 +00:00
5983914c1b ipcs: silly trick with strings. saves ~200 bytes. 2006-09-10 18:26:51 +00:00
c27f4f5445 A quick cleanup pass of some low-hanging mess. 2006-09-08 00:41:48 +00:00
6d655be5df removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.
2006-09-06 19:02:46 +00:00
4cb035dd23 Vladimir Dronnikov (ybrnj80 at yandex dot ru) pointed out that my cleanup of
his code introduced a bug (an extra backslash in the CIFS mount string).
2006-09-05 14:00:21 +00:00
4d609cb5a3 Thinko. 2006-09-04 19:43:26 +00:00
89d9d4d5f7 Vladimir Dronnikov also submitted a CIFS support patch to mount, which I
heavily reworked here and probably broke.  Tomorrow I need to set up a
copy of samba to test against.  (This compiles, I make no promises beyond that.)
2006-09-01 08:10:44 +00:00
88621d7398 Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damage
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan
to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-29 19:41:06 +00:00
73561cc75a - pull from busybox_scratch: r15829:15850
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
   text    data     bss     dec     hex filename
1087742   15853  790632 1894227  1ce753 ../busybox/busybox.old
1086790   15853  790632 1893275  1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped 
function                                             old     new   delta
ipcrm_main                                           756     822     +66
getval                                                 -      61     +61
maybe_set_utc                                          -      40     +40
udhcpc_main                                         2896    2912     +16
md5_hash_block                                       428     437      +9
opt                                                    8      16      +8
qgravechar                                           106     110      +4
make_bitmap                                          292     295      +3
inflate_unzip                                       2056    2059      +3
add_partition                                       1412    1414      +2
__parsespent                                         156     158      +2
qrealloc                                              41      42      +1
format                                                 -       1      +1
catv_main                                            313     314      +1
watch_main                                           293     292      -1
varunset                                              81      80      -1
part                                                   1       -      -1
check_if_skip                                        837     836      -1
start_stop_daemon_main                               840     837      -3
create_lost_and_found                                175     172      -3
supress_non_delimited_lines                            4       -      -4
static.l                                               4       -      -4
static.c                                               5       1      -4
bsd_sum_file                                         237     233      -4
eval2                                                338     332      -6
arithmetic_common                                    166     158      -8
cmpfunc                                               22       5     -17
cksum_main                                           294     275     -19
cmp_main                                             465     439     -26
dd_main                                             1535    1508     -27
rmmod_main                                           376     333     -43
cut_file                                             727     644     -83
ipcs_main                                           3809    3721     -88
cut_main                                             722     614    -108
date_main                                           1443    1263    -180
remove_ids                                           222       -    -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853)       Total: -636 bytes
2006-08-28 23:31:54 +00:00
4470b74e29 The kernel can't handle umount /dev/hdc, we have to do it through mtab,
except that we still have to work when there is no mtab.

Oh, and while we're at it, take advantage of the fact that modern processors
avoid branches via conditional assignment where possible.  ("x = a ? b : c;"
turns into "x = c; if (a) x = b;" because that way there's no branch to
potentially mispredict and thus never a bubble in the pipeline.  The if(a)
turns into an assembly test followed by a conditional assignment (rather
than a conditional jump).)  So since the compiler is going to do that _anyway_,
we might as well take advantage of it to produce a slightly smaller binary.

So there.
2006-08-17 19:07:20 +00:00
10b36f94bb Patch from Chris Steel to fix mdev deleting device nodes. 2006-08-10 01:09:37 +00:00
3ba7bd143e Vladimir Dronnikov convinced me to twiddle the semantics of the new shared
subtree stuff to look more like http://lwn.net/Articles/159077/ thinks
they should.
2006-08-09 19:51:13 +00:00
721b46e0e6 Fix a typo (|| instead of |) and remove two comments about a problem fixed
in the previous patch.
2006-08-08 12:54:02 +00:00
e3781b7312 Add shared subtree support, suggested by Vladimir Dronnikov. Also break out a
few new (unfinished) config options, which I intend to make hidden (but
enabled) when CONFIG_NITPICK is disabled.  Getting the .config infrastructure
to do that is non-obvious, it seems...
2006-08-08 01:39:49 +00:00
47b16a6fe9 Using lstat() instead of stat() means that attempting to loopback mount
a symlink doesn't work.
2006-08-08 00:47:17 +00:00
7250915d78 Make a warning go away on 64-bit systems. 2006-08-06 20:41:11 +00:00
59fe8b9089 There are a number of reasons for reinventing printf(). Writing status to
stdout is not one of them.
2006-08-04 22:02:55 +00:00
081e38483e Remove xcalloc() and convert its callers to xzalloc(). About half of them
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +00:00
7478804b78 Fix umount so loop device disassociation hopefully doesn't screw up errno on
a failed mount.  And while I'm at it, legacy mdev removal was only being done
in the _failure_ case?  That can't be right.  Plus minor header cleanups
and an option parsing tweak.
2006-08-03 17:54:45 +00:00
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
446129adae Add back in non-ifdef version of FEATURE_PRETTY_PRINT, and get the attribution
right this time.
2006-07-27 16:40:55 +00:00
fc367f9824 There's no excuse for adding new #ifdefs to the code like that. None at all. 2006-07-27 15:02:58 +00:00