svn commit: trunk/busybox/util-linux
landley at busybox.net
landley at busybox.net
Tue Aug 30 17:07:50 UTC 2005
Author: landley
Date: 2005-08-30 10:07:49 -0700 (Tue, 30 Aug 2005)
New Revision: 11289
Log:
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).
Modified:
trunk/busybox/util-linux/mount.c
Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c 2005-08-30 04:42:13 UTC (rev 11288)
+++ trunk/busybox/util-linux/mount.c 2005-08-30 17:07:49 UTC (rev 11289)
@@ -99,12 +99,12 @@
}
}
// Unrecognized mount option?
- if(i == sizeof(mount_options)) {
+ if(i == (sizeof(mount_options) / sizeof(*mount_options))) {
// Add it to strflags, to pass on to kernel
i = *strflags ? strlen(*strflags) : 0;
*strflags = xrealloc(*strflags, i+strlen(options)+2);
// Comma separated if it's not the first one
- if(i) (*strflags)[i] = ',';
+ if(i) (*strflags)[i++] = ',';
strcpy((*strflags)+i, options);
}
// Advance to next option, or finish
@@ -286,6 +286,8 @@
else {
rc = 0;
fsType="nfs";
+ // Strangely enough, nfsmount() doesn't actually mount()
+ goto mount_it_now;
}
} else {
More information about the busybox-cvs
mailing list