Whamcloud - gitweb
b=15899
authornathan <nathan>
Tue, 2 Sep 2008 20:53:09 +0000 (20:53 +0000)
committernathan <nathan>
Tue, 2 Sep 2008 20:53:09 +0000 (20:53 +0000)
fix bad error check

lustre/utils/obd.c

index ed6916f..8a3201f 100644 (file)
@@ -201,7 +201,7 @@ int lcfg_mgs_ioctl(char *func, int dev_id, struct lustre_cfg *lcfg)
         
         IOC_INIT(data);
         rc = data.ioc_dev = get_mgs_device();
-        if (rc)
+        if (rc < 0)
                 goto out;
         data.ioc_type = LUSTRE_CFG_TYPE;
         data.ioc_plen1 = lustre_cfg_len(lcfg->lcfg_bufcount,
@@ -2665,7 +2665,7 @@ static int pool_cmd(enum lcfg_command_type cmd,
 
         IOC_INIT(data);
         rc = data.ioc_dev = get_mgs_device();
-        if (rc)
+        if (rc < 0)
                 goto out;
 
         data.ioc_type = LUSTRE_CFG_TYPE;