Whamcloud - gitweb
LU-5141 hsm: Only regular files should be archived
[fs/lustre-release.git] / lustre / utils / lustre_cfg.c
index c5a2379..7a6790b 100644 (file)
@@ -50,6 +50,7 @@
 #include <glob.h>
 
 #include <libcfs/libcfs.h>
+#include <lnet/nidstr.h>
 #include <lustre_cfg.h>
 #include <lustre/lustre_idl.h>
 #include <lustre/lustre_build_version.h>
@@ -759,24 +760,21 @@ static void clean_path(char *path)
  * Path support is deprecated.
  * If a path is supplied it must begin with /proc.  */
 static void lprocfs_param_pattern(const char *cmd, const char *path, char *buf,
-        size_t buf_size)
+                                 size_t buf_size)
 {
-        /* test path to see if it begins with '/proc/' */
-        if (strncmp(path, "/proc/", strlen("/proc/")) == 0) {
-                static int warned;
-                if (!warned) {
-                        fprintf(stderr, "%s: specifying parameters via "
-                                "full paths is deprecated.\n", cmd);
-#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 6, 51, 0)
-#warning "remove deprecated full path tunable access"
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 6, 53, 0)
+       /* test path to see if it begins with '/proc/' */
+       if (strncmp(path, "/proc/", strlen("/proc/")) == 0) {
+               static int warned;
+               if (!warned) {
+                       fprintf(stderr, "%s: specifying parameters via "
+                               "full paths is deprecated.\n", cmd);
+                       warned = 1;
+               }
+               snprintf(buf, buf_size, "%s", path);
+       } else
 #endif
-                        warned = 1;
-                }
-                snprintf(buf, buf_size, "%s", path);
-        } else {
-                snprintf(buf, buf_size, "/proc/{fs,sys}/{lnet,lustre}/%s",
-                        path);
-        }
+       snprintf(buf, buf_size, "/proc/{fs,sys}/{lnet,lustre}/%s", path);
 }
 
 static int listparam_cmdline(int argc, char **argv, struct param_opts *popt)