[BusyBox 0001037]: "mount" problem on using return value of bb_getopt_ulflags()

bugs at busybox.net bugs at busybox.net
Wed Sep 20 04:04:22 UTC 2006


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1037 
====================================================================== 
Reported By:                rockeychu
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1037
Category:                   Other
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             09-19-2006 21:04 PDT
Last Modified:              09-19-2006 21:04 PDT
====================================================================== 
Summary:                    "mount" problem on using return value of 
bb_getopt_ulflags()
Description: 
Very serious! 

--- busybox_org/util-linux/mount.c   2006-09-20 09:50:04.000000000 +0800
+++ busybox/util-linux/mount.c  2006-09-20 11:56:09.550580000 +0800
@@ -1429,7 +1429,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;
@@ -1454,17 +1454,17 @@
        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
+       //if (opt & 2) // -t
+       if (opt & 4) // -r
                append_mount_options(&cmdopts, "ro");
-       if (opt & 4) // -w
+       if (opt & 8) // -w
                append_mount_options(&cmdopts, "rw");
-       //if (opt & 8) // -a
-       if (opt & 0x10) // -n
+       //if (opt & 0x10) // -a
+       if (opt & 0x40) // -n
                USE_FEATURE_MTAB_SUPPORT(useMtab = FALSE);
-       if (opt & 0x20) // -f
+       if (opt & 0x80) // -f
                USE_FEATURE_MTAB_SUPPORT(fakeIt = FALSE);
-       //if (opt & 0x40) // ignore -v
+       //if (opt & 0x20) // ignore -v
        argv += optind;
        argc -= optind;


====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-19-06 21:04  rockeychu      New Issue                                    
09-19-06 21:04  rockeychu      Status                   new => assigned     
09-19-06 21:04  rockeychu      Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list