From db0815db174558d652c0ecf102c4e0c2e4817dcd Mon Sep 17 00:00:00 2001 From: landley Date: Tue, 30 Aug 2005 17:07:49 +0000 Subject: 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). git-svn-id: svn://busybox.net/trunk/busybox@11289 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- util-linux/mount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util-linux/mount.c b/util-linux/mount.c index 35866ea76..05f25a70d 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -99,12 +99,12 @@ static void parse_mount_options(char *options, int *flags, char **strflags) } } // 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 @@ singlemount: else { rc = 0; fsType="nfs"; + // Strangely enough, nfsmount() doesn't actually mount() + goto mount_it_now; } } else { -- cgit v1.2.3-55-g6feb