summaryrefslogtreecommitdiff
path: root/packages/busybox/busybox-1.00
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-05-13 08:04:52 +0000
committerJohn Bowler <jbowler@nslu2-linux.org>2005-05-13 08:04:52 +0000
commit356dcd269c683ea4fe19738a70acb3f28a79f59e (patch)
treee104ae636eb23b093a32e2d6100bc43dcb13acac /packages/busybox/busybox-1.00
parent399c5406270fa3f4488187655aafff1abf7dff3a (diff)
Additional fixes for the BusyBox mount -at option to support
syntax using in the sysvinit package. Adds support for a list of file system types to mount and for negation of this list. BKrev: 42845fa40IHXR-jA_i0GaeOUlxfkoQ
Diffstat (limited to 'packages/busybox/busybox-1.00')
-rw-r--r--packages/busybox/busybox-1.00/mount-all-type.patch84
-rw-r--r--packages/busybox/busybox-1.00/openslug/defconfig2
2 files changed, 85 insertions, 1 deletions
diff --git a/packages/busybox/busybox-1.00/mount-all-type.patch b/packages/busybox/busybox-1.00/mount-all-type.patch
index e69de29bb2..476094a804 100644
--- a/packages/busybox/busybox-1.00/mount-all-type.patch
+++ b/packages/busybox/busybox-1.00/mount-all-type.patch
@@ -0,0 +1,84 @@
+--- busybox-1.00/.pc/mount-all-type.patch/util-linux/mount.c 2004-08-02 17:14:02.000000000 -0700
++++ busybox-1.00/util-linux/mount.c 2005-05-13 00:17:19.054232796 -0700
+@@ -364,6 +364,56 @@
+ exit(EXIT_SUCCESS);
+ }
+
++/* Does this file system type, from /etc/fstab, match the given
++ * -t option value?
++ */
++static int match_fs(const char *option, const char *type)
++{
++ const int len = strlen(type);
++ const int no = option[0] == 'n' && option[1] == 'o';
++ const char *optp = option;
++
++ if (len > 0) do {
++ const char *match = strstr(optp, type);
++
++ if (match == NULL) {
++ /* No match, but if the option string starts 'no' no match
++ * means yes.
++ */
++ return no;
++ }
++
++ /* Match, may be partial, check for end-of-type in option string. */
++ if (match[len] == 0 || match[len] == ',') {
++ /* Ok, check for type or notype. */
++ if (match == option) {
++ /* Exact match at start (can't be 'no') */
++ return 1;
++ }
++ if (match > option+1) {
++ if (match[-1] == ',') {
++ /* Exact match in middle, might be 'no' */
++ return !no;
++ }
++ if (match == option+2 && no) {
++ /* Exact match to 'notype' at start. */
++ return 0;
++ }
++ if (match > option+2 && match[-3] == ',' &&
++ match[-2] == 'n' && match[-1] == 'o') {
++ return 0;
++ }
++ }
++ }
++
++ /* Look for another match. */
++ optp = match+1;
++ } while (1);
++
++ /* zero length type in fstab (impossible?), don't match it. */
++ return 0;
++}
++
+ extern int mount_main(int argc, char **argv)
+ {
+ struct stat statbuf;
+@@ -371,6 +421,7 @@
+ char *extra_opts;
+ int flags = 0;
+ char *filesystemType = "auto";
++ char *filesystemOption = 0;
+ int got_filesystemType = 0;
+ char *device = xmalloc(PATH_MAX);
+ char *directory = xmalloc(PATH_MAX);
+@@ -393,6 +444,7 @@
+ break;
+ case 't':
+ filesystemType = optarg;
++ filesystemOption = optarg;
+ got_filesystemType = 1;
+ break;
+ case 'w':
+@@ -460,6 +512,8 @@
+
+ strcpy(device, m->mnt_fsname);
+ strcpy(directory, m->mnt_dir);
++ if (all && filesystemOption != 0 && !match_fs(filesystemOption, m->mnt_type))
++ continue;
+ filesystemType = bb_xstrdup(m->mnt_type);
+ singlemount:
+ extra_opts = string_flags;
diff --git a/packages/busybox/busybox-1.00/openslug/defconfig b/packages/busybox/busybox-1.00/openslug/defconfig
index 3ccf0ca1d6..9985eb53cc 100644
--- a/packages/busybox/busybox-1.00/openslug/defconfig
+++ b/packages/busybox/busybox-1.00/openslug/defconfig
@@ -231,7 +231,7 @@ CONFIG_GREP=y
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_XARGS=y
+# CONFIG_XARGS is not set
# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set