+/* Supporting file paths creates perilous behavoir: LU-888.
+ * 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)
+{
+ /* 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, 50, 0)
+#warning "remove deprecated full path tunable access"
+#endif
+ warned = 1;
+ }
+ snprintf(buf, buf_size, "%s", path);
+ } else {
+ snprintf(buf, buf_size, "/proc/{fs,sys}/{lnet,lustre}/%s",
+ path);
+ }
+}
+