Whamcloud - gitweb
LU-9679 general: add missing spaces to folded strings.
[fs/lustre-release.git] / lustre / mgs / mgs_handler.c
index 926b30f..6487d72 100644 (file)
@@ -328,25 +328,23 @@ static int mgs_check_target(const struct lu_env *env,
 /* Ensure this is not a failover node that is connecting first*/
 static int mgs_check_failover_reg(struct mgs_target_info *mti)
 {
-        lnet_nid_t nid;
-        char *ptr;
-        int i;
+       lnet_nid_t nid;
+       char *ptr;
+       int i;
 
-        ptr = mti->mti_params;
-        while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) {
+       ptr = mti->mti_params;
+       while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) {
                while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
-                        for (i = 0; i < mti->mti_nid_count; i++) {
-                                if (nid == mti->mti_nids[i]) {
-                                        LCONSOLE_WARN("Denying initial registra"
-                                                      "tion attempt from nid %s"
-                                                      ", specified as failover"
-                                                      "\n",libcfs_nid2str(nid));
-                                        return -EADDRNOTAVAIL;
-                                }
-                        }
-                }
-        }
-        return 0;
+                       for (i = 0; i < mti->mti_nid_count; i++) {
+                               if (nid == mti->mti_nids[i]) {
+                                       LCONSOLE_WARN("Denying initial registration attempt from nid %s, specified as failover\n",
+                                                     libcfs_nid2str(nid));
+                                       return -EADDRNOTAVAIL;
+                               }
+                       }
+               }
+       }
+       return 0;
 }
 
 /* Called whenever a target starts up.  Flags indicate first connect, etc. */
@@ -742,7 +740,7 @@ static int mgs_extract_fs_pool(char *arg, char *fsname, char *poolname)
        /* Also make sure poolname is not to long. */
        if (strlen(ptr) > LOV_MAXPOOLNAME)
                return -ENAMETOOLONG;
-       strncpy(poolname, ptr, strlen(ptr));
+       strncpy(poolname, ptr, LOV_MAXPOOLNAME);
 
        /* Test if fsname is empty */
        len = strlen(arg) - strlen(ptr) - 1;
@@ -1734,7 +1732,7 @@ static int mgs_health_check(const struct lu_env *env, struct obd_device *obd)
 }
 
 /* use obd ops to offer management infrastructure */
-static struct obd_ops mgs_obd_device_ops = {
+static const struct obd_ops mgs_obd_device_ops = {
        .o_owner                = THIS_MODULE,
        .o_connect              = mgs_obd_connect,
        .o_reconnect            = mgs_obd_reconnect,