Whamcloud - gitweb
LU-5396 all: use NULL instead of 0
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 0ae9886..24cd79c 100644 (file)
@@ -194,7 +194,7 @@ int lustre_start_simple(char *obdname, char *type, char *uuid,
        int rc;
        CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
 
-       rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, 0, 0);
+       rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, NULL, NULL);
        if (rc) {
                CERROR("%s attach error %d\n", obdname, rc);
                return rc;
@@ -202,7 +202,7 @@ int lustre_start_simple(char *obdname, char *type, char *uuid,
        rc = do_lcfg(obdname, 0, LCFG_SETUP, s1, s2, s3, s4);
        if (rc) {
                CERROR("%s setup error %d\n", obdname, rc);
-               do_lcfg(obdname, 0, LCFG_DETACH, 0, 0, 0, 0);
+               do_lcfg(obdname, 0, LCFG_DETACH, NULL, NULL, NULL, NULL);
        }
        return rc;
 }
@@ -347,7 +347,7 @@ int lustre_start_mgc(struct super_block *sb)
                        lnet_process_id_t id;
                        while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
                                rc = do_lcfg(mgcname, id.nid, LCFG_ADD_UUID,
-                                            niduuid, 0, 0, 0);
+                                            niduuid, NULL, NULL, NULL);
                        }
                } else {
                        /* Use mgsnode= nids */
@@ -368,7 +368,7 @@ int lustre_start_mgc(struct super_block *sb)
                         */
                        while (class_parse_nid(ptr, &nid, &ptr) == 0) {
                                rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
-                                            niduuid, 0, 0, 0);
+                                            niduuid, NULL, NULL, NULL);
                                if (rc == 0) {
                                        i = 1;
                                        break;
@@ -380,7 +380,7 @@ int lustre_start_mgc(struct super_block *sb)
                 ptr = lsi->lsi_lmd->lmd_dev;
                 while (class_parse_nid(ptr, &nid, &ptr) == 0) {
                        rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
-                                    niduuid, 0, 0, 0);
+                                    niduuid, NULL, NULL, NULL);
                        if (rc == 0)
                                ++i;
                         /* Stop at the first failover nid */
@@ -402,7 +402,7 @@ int lustre_start_mgc(struct super_block *sb)
         /* Start the MGC */
         rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME,
                                 (char *)uuid->uuid, LUSTRE_MGS_OBDNAME,
-                                niduuid, 0, 0);
+                                niduuid, NULL, NULL);
         OBD_FREE_PTR(uuid);
         if (rc)
                 GOTO(out_free, rc);
@@ -416,7 +416,7 @@ int lustre_start_mgc(struct super_block *sb)
                j = 0;
                while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
                        rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
-                                    niduuid, 0, 0, 0);
+                                    niduuid, NULL, NULL, NULL);
                        if (rc == 0)
                                ++j;
                        if (*ptr == ':')
@@ -424,7 +424,7 @@ int lustre_start_mgc(struct super_block *sb)
                }
                if (j > 0) {
                        rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
-                                    niduuid, 0, 0, 0);
+                                    niduuid, NULL, NULL, NULL);
                        if (rc == 0)
                                ++i;
                 } else {
@@ -491,7 +491,7 @@ static int lustre_stop_mgc(struct super_block *sb)
 {
         struct lustre_sb_info *lsi = s2lsi(sb);
         struct obd_device *obd;
-        char *niduuid = 0, *ptr = 0;
+       char *niduuid = NULL, *ptr = NULL;
         int i, rc = 0, len = 0;
         ENTRY;
 
@@ -544,7 +544,7 @@ static int lustre_stop_mgc(struct super_block *sb)
         for (i = 0; i < lsi->lsi_lmd->lmd_mgs_failnodes; i++) {
                 sprintf(ptr, "_%x", i);
                 rc = do_lcfg(LUSTRE_MGC_OBDNAME, 0, LCFG_DEL_UUID,
-                             niduuid, 0, 0, 0);
+                            niduuid, NULL, NULL, NULL);
                 if (rc)
                         CERROR("del MDC UUID %s failed: rc = %d\n",
                                niduuid, rc);