Whamcloud - gitweb
LU-10003 lnet: clarify lctl deprecation message 30/31030/2
authorAmir Shehata <amir.shehata@intel.com>
Thu, 25 Jan 2018 22:18:10 +0000 (14:18 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 6 Feb 2018 04:26:08 +0000 (04:26 +0000)
Print out the lctl command which is deprecated

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I2d07a609718c205fba172530202e6f0c1b1d2119
Reviewed-on: https://review.whamcloud.com/31030
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/utils/portals.c

index 4ebf306..e5cf799 100644 (file)
@@ -299,7 +299,8 @@ int jt_ptl_network(int argc, char **argv)
        __u32 net = LNET_NIDNET(LNET_NID_ANY);
        int rc;
 
-       fprintf(stderr, "This command has been deprecated. Plesae use 'lnetctl net add'\n");
+       fprintf(stderr, "lctl %s: has been deprecated. Please use "
+                       "'lnetctl net'\n", argv[0]);
 
        if (argc != 2) {
                fprintf(stderr, "usage: %s <net>|up|down\n", argv[0]);
@@ -359,7 +360,8 @@ jt_ptl_list_nids(int argc, char **argv)
         int                      count;
         int                      rc;
 
-       fprintf(stderr, "This command has been deprecated. Plesae use 'lnetctl net show'\n");
+       fprintf(stderr, "lctl %s: has been deprecated. Please use "
+                       "'lnetctl net show'\n", argv[0]);
 
         all = (argc == 2) && (strcmp(argv[1], "all") == 0);
         /* Hack to pass back value */
@@ -922,7 +924,8 @@ int jt_ptl_ping(int argc, char **argv)
         char                    *sep;
         int                      i;
 
-       fprintf(stderr, "This command has been deprecated. Plesae use 'lnetctl ping'\n");
+       fprintf(stderr, "lctl %s: has been deprecated. Please use "
+                       "'lnetctl ping'\n", argv[0]);
 
         if (argc < 2) {
                 fprintf(stderr, "usage: %s id [timeout (secs)]\n", argv[0]);
@@ -1229,7 +1232,8 @@ jt_ptl_print_routes (int argc, char **argv)
        int                       alive;
        unsigned int              pri;
 
-       fprintf(stderr, "This command has been deprecated. Plesae use 'lnetctl route show'\n");
+       fprintf(stderr, "lctl %s: has been deprecated. Please use "
+                       "'lnetctl route show'\n", argv[0]);
 
        for (index = 0; ; index++) {
                LIBCFS_IOC_INIT_V2(data, cfg_hdr);