svn commit: trunk/busybox/util-linux
vda at busybox.net
vda at busybox.net
Sun Sep 24 01:01:02 UTC 2006
Author: vda
Date: 2006-09-23 18:01:01 -0700 (Sat, 23 Sep 2006)
New Revision: 16210
Log:
mount: fix breakage from recent changes (spurious -ro mounts)
Modified:
trunk/busybox/util-linux/mount.c
Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c 2006-09-23 19:56:21 UTC (rev 16209)
+++ trunk/busybox/util-linux/mount.c 2006-09-24 01:01:01 UTC (rev 16210)
@@ -9,10 +9,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-/* todo:
- * bb_getopt_ulflags();
- */
-
/* Design notes: There is no spec for mount. Remind me to write one.
mount_main() calls singlemount() which calls mount_it_now().
@@ -1427,7 +1423,7 @@
int mount_main(int argc, char **argv)
{
- enum { OPT_ALL = 0x8 };
+ enum { OPT_ALL = 0x10 };
char *cmdopts = xstrdup(""), *fstype=0, *storage_path=0;
char *opt_o;
@@ -1445,24 +1441,20 @@
append_mount_options(&cmdopts,argv[i]+2);
} else argv[j++] = argv[i];
}
+ argv[j] = 0;
argc = j;
// Parse remaining options
- opt = bb_getopt_ulflags(argc, argv, "o:t:rwavnf", &opt_o, &fstype);
- if (opt & 1) // -o
- append_mount_options(&cmdopts, opt_o);
- //if (opt & 1) // -t
- if (opt & 2) // -r
- append_mount_options(&cmdopts, "ro");
- if (opt & 4) // -w
- append_mount_options(&cmdopts, "rw");
- //if (opt & 8) // -a
- if (opt & 0x10) // -n
- USE_FEATURE_MTAB_SUPPORT(useMtab = FALSE);
- if (opt & 0x20) // -f
- USE_FEATURE_MTAB_SUPPORT(fakeIt = FALSE);
- //if (opt & 0x40) // ignore -v
+ opt = bb_getopt_ulflags(argc, argv, "o:t:rwanfv", &opt_o, &fstype);
+ if (opt & 0x1) append_mount_options(&cmdopts, opt_o); // -o
+ //if (opt & 0x2) // -t
+ if (opt & 0x4) append_mount_options(&cmdopts, "ro"); // -r
+ if (opt & 0x8) append_mount_options(&cmdopts, "rw"); // -w
+ //if (opt & 0x10) // -a
+ if (opt & 0x20) USE_FEATURE_MTAB_SUPPORT(useMtab = FALSE); // -n
+ if (opt & 0x40) USE_FEATURE_MTAB_SUPPORT(fakeIt = FALSE); // -f
+ //if (opt & 0x80) // -v: ignore
argv += optind;
argc -= optind;
More information about the busybox-cvs
mailing list