Whamcloud - gitweb
b=22386 disallow wrong conf_param options
authorAndrew Perepechko <andrew.perepechko@oracle.com>
Fri, 22 Oct 2010 00:23:19 +0000 (04:23 +0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Fri, 22 Oct 2010 00:41:40 +0000 (04:41 +0400)
i=Johann Lombardi
i=Nathan Rutman

lustre/mgs/mgs_llog.c

index 20469a8..223aeb1 100644 (file)
@@ -2361,7 +2361,7 @@ static int mgs_write_log_param(struct obd_device *obd, struct fs_db *fsdb,
         struct lustre_cfg_bufs bufs;
         char *logname;
         char *tmp;
-        int rc = 0;
+        int rc = 0, rc2 = 0;
         ENTRY;
 
         /* For various parameter settings, we have to figure out which logs
@@ -2614,12 +2614,13 @@ static int mgs_write_log_param(struct obd_device *obd, struct fs_db *fsdb,
         }
 
         LCONSOLE_WARN("Ignoring unrecognized param '%s'\n", ptr);
+        rc2 = -ENOSYS;
 
 end:
         if (rc)
                 CERROR("err %d on param '%s'\n", rc, ptr);
 
-        RETURN(rc);
+        RETURN(rc ?: rc2);
 }
 
 /* Not implementing automatic failover nid addition at this time. */