Commit Graph

175 Commits

Author SHA1 Message Date
Denis Vlasenko
116080a13a mount: make Rob happy by reinstating #defines 2006-09-21 11:13:08 +00:00
Denis Vlasenko
85f9e32f7f mount: fstabname needs to be const char* 2006-09-19 14:14:12 +00:00
Denis Vlasenko
23514fe251 mount: fix warning (printf field width of * wants int, not size_t) 2006-09-19 14:07:52 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Denis Vlasenko
a6127aacef mount: style fixlet 2006-09-17 15:51:52 +00:00
Denis Vlasenko
029c469934 mount: revert mount --bind to using "bind" as fstype. 2006-09-17 15:39:22 +00:00
Denis Vlasenko
a52145a927 mount: mount_it_now() - char *dir is not really needed. 2006-09-17 15:09:48 +00:00
Denis Vlasenko
c889d2b786 mount: fix "duplicate mount options in mtab" bug 2006-09-17 15:08:12 +00:00
Denis Vlasenko
c0975199be mount: nfs_strerror's static buffer was bigger than needed. 2006-09-17 15:06:34 +00:00
Denis Vlasenko
9c99b62b9e mount: getopt_ulflag'ification 2006-09-17 15:05:31 +00:00
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
30a64cdc95 mount: reorder things, fix NFS-less mount. 2006-09-15 15:12:00 +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
Denis Vlasenko
727ef94447 mount: fix mtab support (but it is still rather buggy) 2006-09-14 13:19:19 +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
Denis Vlasenko
39e93cc951 nfsmount: nfsmount.h merged into nfsmount.c 2006-09-10 18:38:17 +00:00
Denis Vlasenko
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
Rob Landley
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
Rob Landley
4d609cb5a3 Thinko. 2006-09-04 19:43:26 +00:00
Rob Landley
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
Rob Landley
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
Rob Landley
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
Rob Landley
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
Rob Landley
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
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
Rob Landley
0cc2c2c289 Patch from Paul Fox to improve mount's error handling behavior, which I beat
on a bit.
2006-06-21 03:53:33 +00:00
Rob Landley
dbfb5a3cb7 Andre (armcc2200@yahoo) patched a bug where successful mounts could sometimes
produce an error, due to a missing rc assignment.
2006-06-21 02:39:57 +00:00
Rob Landley
22d26fc6ae Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot of
fallout due to the #include <sys/mount.h>.  Removed that #include from various
applets and fixed up those that were unhappy when that #include was made
because they'd block copied stuff out of it.  (Sigh.)
2006-06-15 15:49:36 +00:00
Rob Landley
8bb50782a5 Change llist_add_* to take the address of the list rather than returning the new
head, and change all the callers.
2006-05-26 23:44:51 +00:00
Bernhard Reutner-Fischer
08421e1d0c - work around bug in gcc-3.4.x on ARM 2006-05-26 14:05:48 +00:00
Rob Landley
a6b5b60942 Fiddling with llist to make memory management easier. Specifically, the
option to delete the contents of the list when we delete the list is a
good thing.
2006-05-08 19:03:07 +00:00
Rob Landley
49159c7f94 Patch from Jason Schoon to make mount -a not abort on the first failure. 2006-05-05 15:01:38 +00:00
Rob Landley
19af279d16 Kumar spotted another bug: if we autodetect nfs and they haven't specified the
fstype, it should be set to nfs.
2006-04-05 01:43:39 +00:00
Rob Landley
ab8736064b You'd think there'd be a compiler warning for "pointless if", wouldn't you? 2006-04-04 16:56:04 +00:00
Rob Landley
20fef96dd8 Bug spotted by Kumar Gala. Hopefully this fixes it... 2006-04-01 17:32:52 +00:00
Rob Landley
fe908fda28 Kumar Gala tracked down a problem with NFS mounting. This is a different fix
from his, but to the same problem.
2006-03-29 14:30:49 +00:00
Rob Landley
92fff34de6 Bernhard Fischer spotted that we shouldn't free fstype if we didn't allocate
it.
2006-03-28 19:19:19 +00:00
Eric Andersen
9601a1c8c2 whitespace cleanup 2006-03-20 18:07:50 +00:00
Eric Andersen
19b5b8ff6a Fix some obvious compile problems. Make the -f' fakeIt option actually work. 2006-03-20 18:07:13 +00:00
Rob Landley
eaa34ca5b4 More fixes. Type "auto" should mean unspecified from fstab as well as the
command line, initialize singlemount's rc to an error value so it doesn't
think it succeeded when it didn't, use absolute path when associating a
loop device (and the previous FEATURE_CLEAN_UP logic related to that was
freeing the wrong thing), move reading of /proc/filesystems to where we can
re-read it (when it's empty) for every entry on a "mount -a" so that when
/proc is mounted as the first entry, the later filesystems can autodetect
filesystem type.
2006-03-18 02:58:11 +00:00
Rob Landley
dc0955b603 The new, new mount rewrite. (Mount double prime?) Still being debugged, but
the new infrastructure is reentrant so in theory it's capable of handling
mount -a sanely.  It can also re-use existing flags with remount, handle
-t auto, mount -a -t, and several smaller bugfixes.
2006-03-14 18:16:25 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
71d6ccd801 With -a, the jump to mount_it_now can skip the initialization of f, and
if we don't zero it after closing it we re-close a filehandle that isn't
open, and since this is a file _pointer_ it segfaults on a double free.

Yeah, subtle bug.  I need to break this out into separate functions if I can
figure out how to avoid making the code larger while doing so.  Part of
the general -a and -o remount work I need to do, but that's after 1.1.0...
2006-01-10 05:30:28 +00:00
Rob Landley
8b0efdb1a1 Both atime and diratime should switch _off_ the corresponding no* flag. 2006-01-10 02:37:20 +00:00
Rob Landley
7b363fd3c9 Some minor cleanups/bugfixes split off from the big remount work:
Shorten GPL boilerplate.
  Enabling FEATURE_CLEAN_UP broke things in two places.
  Move the NFS with uClibc check to nfsmount.c
2005-12-20 17:18:01 +00:00
Bernhard Reutner-Fischer
126da9ec2d - typo: s/sucess/success/g
What's up with loginutils/su.c line 42: "SYSLOG_SUCESS" ? Please have a look..
2005-12-12 11:20:39 +00:00