Whamcloud - gitweb
branch: HEAD
authorericm <ericm>
Sat, 18 Jul 2009 00:04:43 +0000 (00:04 +0000)
committerericm <ericm>
Sat, 18 Jul 2009 00:04:43 +0000 (00:04 +0000)
mount.lustre don't filter out option "mgssec".
b=19413
r=fanyong
r=yujian

lustre/utils/mount_lustre.c

index bbbe9ef..52b9989 100644 (file)
@@ -266,6 +266,13 @@ static int parse_one_option(const char *check, int *flagp)
         return 0;
 }
 
+static void append_option(char *options, const char *one)
+{
+        if (*options)
+                strcat(options, ",");
+        strcat(options, one);
+}
+
 /* Replace options with subset of Lustre-specific options, and
    fill in mount flags */
 int parse_options(char *orig_options, int *flagp)
@@ -293,6 +300,8 @@ int parse_options(char *orig_options, int *flagp)
                                         retry = MAX_RETRIES;
                                 else if (retry < 0)
                                         retry = 0;
+                        } else if (strncmp(arg, "mgssec", 6) == 0) {
+                                append_option(options, opt);
                         }
                 } else if (strncmp(opt, "force", 5) == 0) {
                         //XXX special check for 'force' option
@@ -300,9 +309,7 @@ int parse_options(char *orig_options, int *flagp)
                         printf("force: %d\n", force);
                 } else if (parse_one_option(opt, flagp) == 0) {
                         /* pass this on as an option */
-                        if (*options)
-                                strcat(options, ",");
-                        strcat(options, opt);
+                        append_option(options, opt);
                 }
         }
         strcpy(orig_options, options);