Whamcloud - gitweb
b=22455 fix the problem in get_param with option "-N"
authorLiuYing <Emoly.Liu@sun.com>
Wed, 2 Jun 2010 10:24:34 +0000 (18:24 +0800)
committerRobert Read <robert.read@oracle.com>
Wed, 2 Jun 2010 18:44:04 +0000 (11:44 -0700)
-set flag recursive=0 when we get param with option "-N"
-use operator "=" to set param with negative value

i=adilger
i=rread

lustre/tests/test-framework.sh
lustre/utils/lctl.c
lustre/utils/lustre_cfg.c

index 97bdb60..900f93f 100644 (file)
@@ -1750,7 +1750,7 @@ switch_identity() {
         do_facet mds$num "lctl set_param -n mdt.$MDT.identity_upcall \"NONE\""
     fi
 
-    do_facet mds$num "lctl set_param -n mdt/$MDT/identity_flush \"-1\""
+    do_facet mds$num "lctl set_param -n mdt/$MDT/identity_flush=-1"
 
     if [ $old = "NONE" ]; then
         return 1
index 369dab4..cd22582 100644 (file)
@@ -147,7 +147,7 @@ command_t cmdlist[] = {
          "  -F  When -N specified, add '/', '@' or '=' for directories,\n"
          "      symlinks and writeable files, respectively."},
         {"set_param", jt_lcfg_setparam, 0, "set the Lustre or LNET parameter\n"
-         "usage: set_param [-n] <param_path1=value1 param_path2 value2 ...>\n"
+         "usage: set_param [-n] <param_path1=value1 param_path2=value2 ...>\n"
          "Set the value of the Lustre or LNET parameter at the specified path\n"
          "  -n  Disable printing of the key name when printing values."},
         {"list_param", jt_lcfg_listparam, 0,
index 4b527d0..9079242 100644 (file)
@@ -647,10 +647,10 @@ static void clean_path(char *path)
 }
 
 struct param_opts {
-        int only_path;
-        int show_path;
-        int show_type;
-        int recursive;
+        int only_path:1;
+        int show_path:1;
+        int show_type:1;
+        int recursive:1;
 };
 
 static int listparam_cmdline(int argc, char **argv, struct param_opts *popt)
@@ -766,6 +766,7 @@ static int getparam_cmdline(int argc, char **argv, struct param_opts *popt)
         popt->show_path = 1;
         popt->only_path = 0;
         popt->show_type = 0;
+        popt->recursive = 0;
 
         while ((ch = getopt(argc, argv, "nNF")) != -1) {
                 switch (ch) {
@@ -905,6 +906,7 @@ static int setparam_cmdline(int argc, char **argv, struct param_opts *popt)
         popt->show_path = 1;
         popt->only_path = 0;
         popt->show_type = 0;
+        popt->recursive = 0;
 
         while ((ch = getopt(argc, argv, "n")) != -1) {
                 switch (ch) {