Whamcloud - gitweb
LU-11010 tests: remove calls to return after skip()
[fs/lustre-release.git] / lustre / utils / portals.c
index 12aec42..e544588 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  *
- * Copyright (c) 2013, 2015, Intel Corporation.
+ * Copyright (c) 2013, 2017, Intel Corporation.
  *
  *   This file is part of Lustre, https://wiki.hpdd.intel.com/
  *
 #include <time.h>
 #include <linux/types.h>
 
-#include <libcfs/util/string.h>
 #include <libcfs/util/ioctl.h>
 #include <linux/lnet/libcfs_debug.h>
 #include <linux/lnet/lnet-dlc.h>
 #include <linux/lnet/lnetctl.h>
 #include <linux/lnet/nidstr.h>
 #include <linux/lnet/socklnd.h>
+#include <lustre/lustreapi.h>
 
 unsigned int libcfs_debug;
 unsigned int libcfs_printk = D_CANTMASK;
@@ -177,7 +177,7 @@ ptl_ipaddr_2_str(__u32 ipaddr, char *str, size_t strsize, int lookup)
                 net_ip = htonl (ipaddr);
                 he = gethostbyaddr (&net_ip, sizeof (net_ip), AF_INET);
                 if (he != NULL) {
-                       strlcpy(str, he->h_name, strsize);
+                       snprintf(str, strsize, "%s", he->h_name);
                         return (str);
                 }
         }
@@ -287,8 +287,8 @@ int ptl_initialize(int argc, char **argv)
        if (argc > 1)
                g_net_interactive = true;
 
-        register_ioc_dev(LNET_DEV_ID, LNET_DEV_PATH,
-                         LNET_DEV_MAJOR, LNET_DEV_MINOR);
+       register_ioc_dev(LNET_DEV_ID, LNET_DEV_PATH);
+
         return 0;
 }