Commit Graph

396 Commits

Author SHA1 Message Date
"Vladimir N. Oleynik"
1f2dc40ede data --> bss 2005-10-15 13:56:17 +00:00
"Vladimir N. Oleynik"
f704b27b5b - new bb_opt_complementally syntax, use [-:?] only - 'free' chars
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
Bernhard Reutner-Fischer
bb66a6c94e - initialize the correct variables 2005-10-13 10:24:44 +00:00
"Vladimir N. Oleynik"
064f04e7e2 - use complementally '!' to '?' - 'ask' is best 'free' char for this.
- more long opt compatibility, can set flag for long opt struct now
- more logic: check opt-depend requires and global requires, special for 'id' and 'start-stop-daemon' applets.
2005-10-11 14:38:01 +00:00
"Vladimir N. Oleynik"
54cb5c6af3 better check usage with options, correct show problem error message, indent 2005-10-10 12:17:33 +00:00
Rob Landley
4a7252babd Rename CONFIG_NFSMOUNT to CONFIG_FEATURE_MOUNT_NFS so allbaseconfig can
find it (and tweak defconfig to catch up).
2005-10-08 18:49:45 +00:00
Mike Frysinger
747fc5d5fd allow people to adjtime location 2005-09-28 03:21:21 +00:00
Mike Frysinger
95544f78cb whitespace sucks 2005-09-25 05:23:58 +00:00
Mike Frysinger
75aa1928ac re-order a little for alphabetical 2005-09-24 23:12:38 +00:00
Rob Landley
16722554bf Tito switched option parsing over to switch umount over to bb_getopt_ulflags(). 2005-09-24 22:41:08 +00:00
Mike Frysinger
62f18e1f20 use the shorter license header 2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5 use brief license line 2005-09-24 06:01:57 +00:00
"Vladimir N. Oleynik"
24cca8d958 Reduce exported from ipcs applet 2005-09-22 13:13:23 +00:00
Mike Frysinger
2d5e4f6b05 accept unlimited number of swap arguments like the real swap{on,off} and shrink do_em_all a little 2005-09-16 04:41:20 +00:00
Rob Landley
b7285001c9 Cleanup patch from Tito. 2005-09-14 15:28:15 +00:00
Mike Frysinger
6943a9489e whitespace/syntax cleanups, dont mind me :p 2005-09-13 02:29:39 +00:00
Rob Landley
bc3d4a175f Cleanup patch from Tito. 2005-09-13 01:30:19 +00:00
Rob Landley
658d2cf986 Tito sent in a few patches converting instances of CONFIG_FEATURE_CLEAN_UP to
ENABLE_FEATURE_CLEAN_UP.
2005-09-08 03:11:58 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Rob Landley
dbaf97e463 Fix the warnings, and fix the following two obvious segfaults:
./busybox getopt -n one -n two woot
	./busybox getopt -o one -o two woot

This entire applet is still an enormous pile of garbage, which I can't clean
up because I really have no idea what it's for.  (Both "man getopt" and trying
it out on the command line a bit fail to enlighten me.  Reading the code, the
fact half of it seems to be special cases for bash vs tcsh does not fill me
with confidence.)
2005-09-05 06:16:53 +00:00
Rob Landley
9a643149de Amir Shalem found some bugs in the new mount code; unknown options didn't get
added to the list, and my assumption that nfsmount() actually called
mount() was incorrect (and I coded it wrong anyway; I hate having to touch
codepaths I can't personally test).
2005-08-30 17:07:49 +00:00
Rob Landley
f4c684a1ef When compiling with FEATURE_MTAB_SUPPORT disabled, the call to erase_mtab()
can never be made because useMtab is initialized to 0, and all the other
assignments of that variable assign 0 to it.  Any compiler that can perform
simple constant propogation on local variables will optimize away if statements
testing against that variable, thus the call to erase_mtab() will never be
made.

When compiling for arm using gcc 3.3.3 with FEATURE_MTAB_SUPPORT disabled,
the linker complains that it can't find erase_mtab().  The arm optimizer isn't
exactly the brightest member of the family, and apparently needs to be hit over
the head with a hammer to get its' attention...
2005-08-23 20:03:17 +00:00
Rob Landley
de5fd23f25 If we goto singlemount, do _not_ try to continue through the loop we jumped
into.  (That means "mount -t ext2 /dev/thingy thingy" would segfault if
it failed instead of giving us an error message.)
2005-08-14 19:26:14 +00:00
Rob Landley
6e98521d68 Stephane Billiart noticed that the return code of the new mount was horked.
(Cleaned up the return code path to consistently use numbers so I don't keep
confusing EXIT_SUCCESS with TRUE and EXIT_FAILURE with FALSE...)
2005-08-14 18:46:34 +00:00
Rob Landley
6a6798b8e4 Major rewrite of mount, umount, losetup. Untangled lots of code, shrunk
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.
- *
2005-08-10 20:35:54 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Paul Fox
3f6f3174e9 applying fix from:
0000068: mount limited to max 8 loop devices (patch provided)  

(made minor wording change for config help message)
2005-07-19 20:55:37 +00:00
Eric Andersen
576db48ef0 applets specified as _BB_SUID_ALWAYS in applets.h should also select
CONFIG_FEATURE_SUID to ensure proper behavior when installed.
2005-06-23 18:58:57 +00:00
Rob Landley
6eb1e41674 Rodney Radford submitted ipcs and ipcrm (system V IPC stuff). They could use
some more work to shrink them down.
2005-06-20 04:30:36 +00:00
Paul Mundt
8b2d02ed34 Add readprofile applet support. 2005-05-20 17:22:18 +00:00
Mike Frysinger
348e84c202 change the hardcoded error constant (0x80000000UL) to a nice flexible define (BB_GETOPT_ERROR) 2005-05-11 00:39:03 +00:00
Mike Frysinger
7eb6457c4c moved to e2fsprogs too 2005-04-25 05:00:33 +00:00
Mike Frysinger
3b59821cbd remove lsattr/chattr to prepare for a top level e2fsprogs dir with more stuff in it 2005-04-23 01:45:08 +00:00
Mike Frysinger
de9f1f757a import lsattr and chattr from e2fsprogs 2005-04-22 02:33:37 +00:00
Mike Frysinger
f547d672cf fix typoe (buildddir -> builddir) 2005-04-21 01:49:05 +00:00
Mike Frysinger
b31566ef32 minor style touchups 2005-04-16 04:48:48 +00:00
Eric Andersen
7daa076d3e egor duda writes:
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
2004-10-08 07:46:08 +00:00
Glenn L McGrath
d4004ee6a9 Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also. 2004-09-14 17:24:59 +00:00
Eric Andersen
b225e2a76b Fixup some warnings 2004-08-28 00:43:07 +00:00
Eric Andersen
93d7fba892 Tito, farmatito at tiscali dot it writes:
Hi to all,
This patch is useful for:
1) remove an unused var from extern char *find_real_root_device_name(const char* name)
    changing it to extern char *find_real_root_device_name(void).
2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and  util-linux/umount.c accordingly.
3) fixes a bug, really a false positive,  in find_real_root_device_name() that happens if
    in the /dev directory exists a link named root (/dev/root) that should be skipped but
    is not. This affects applets like df that display wrong results
2004-08-03 00:14:02 +00:00
Eric Andersen
882cec3e40 YAEGASHI Takeshi writes:
Hi,

With the following /etc/fstab (any two or more lines of nfs), mount -a
-t nfs causes a segmentation faults.

server:/exports/aaa /mnt/aaa nfs defaults 0 0
server:/exprots/bbb /mnt/bbb nfs defaults 0 0

In util-linux/nfsmount.c, it overwrites malloc'ed pointer *mount_opts
with a static pointer.  With this patch it does proper memory realloc
and data copy instead.
2004-07-26 12:05:12 +00:00
Eric Andersen
d926149d26 Avoid a number of places where large drives could wrap a uint, and
instead use off_t which will be automagically promoted to 64bit if
compiled with support for large drives.
 -Erik
2004-06-28 23:50:31 +00:00
Eric Andersen
86af052d25 Kevin P. Fleming writes:
Yes, I know busybox is in feature freeze. If this two-liner is too much
that's fine, but it's handy.

This patch allows busybox mount to support "-o move" just like it
supports "-o bind", which is the equivalent of util-linux "mount --move".

Usage is:

mount -o move /mnt/point/1 /mnt/point/2

where /mnt/point/1 is an already mounted filesystem; it will be moved to
/mnt/point/2.
2004-05-26 21:26:07 +00:00
Eric Andersen
42f8883c71 Per suggestion from Bastian Blank, be less evil when we force fdisk to
transparently remap 32-bit interfaces to actually use 64 bit interfaces.
 -Erik
2004-05-26 11:59:19 +00:00
Eric Andersen
823b17263a Use tab not space 2004-05-26 11:50:37 +00:00
Eric Andersen
1be01072e9 Do not select LFS 2004-05-19 11:06:20 +00:00
Eric Andersen
84bdea8cb2 Erik,
>http://busybox.net/cgi-bin/cvsweb/busybox/util-linux/fdisk.c?r1=1.22&r2=1.23&diff_format=u

Its hack for "force" ;-)

If to return the previous version of a Config.in
http://busybox.net/cgi-bin/cvsweb/busybox/util-linux/Config.in?r1=1.12&r2=1.13
and to apply last patch, then I shall calm down. ;-)


(OOPS, last patch have autocorrected from my editor begins spaces to tabs and
removed spaces from empty lines too).


--w
vodz
2004-05-19 10:49:17 +00:00
Eric Andersen
256c4fd587 Make vodz happy and make fdisk always use large file support if
possible, even if LFS is not enabled for the rest of busybox.
 -Erik
2004-05-19 09:00:00 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
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
2004-04-14 17:51:38 +00:00
Eric Andersen
ee4b7d496d make mount ignore -n when CONFIG_FEATURE_MTAB_SUPPORT is disabled 2004-04-12 15:02:53 +00:00