Whamcloud - gitweb
LU-5844 get rid of IOC_LIBCFS_MEMHOG and IOC_LIBCFS_PANIC ioctls
[fs/lustre-release.git] / lnet / utils / debug.c
index a54e514..aae7e46 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 #define _GNU_SOURCE
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
 #include <unistd.h>
-#include <libcfs/libcfs.h>
+
+#include <linux/types.h>
+
 #include <libcfs/util/ioctl.h>
+#include <libcfs/user-time.h>
+#include <libcfs/libcfs_debug.h>
 #include <lnet/lnetctl.h>
 
 static char rawbuf[8192];
@@ -846,28 +861,3 @@ int jt_dbg_modules(int argc, char **argv)
        fclose(file);
        return 0;
 }
-
-int jt_dbg_panic(int argc, char **argv)
-{
-       int                      rc;
-       struct libcfs_ioctl_data data;
-
-       if (argc != 1) {
-               fprintf(stderr, "usage: %s\n", argv[0]);
-               return 0;
-       }
-
-       memset(&data, 0, sizeof(data));
-       if (libcfs_ioctl_pack(&data, &buf, max) != 0) {
-               fprintf(stderr, "libcfs_ioctl_pack failed.\n");
-               return -1;
-       }
-
-       rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_PANIC, buf);
-       if (rc) {
-               fprintf(stderr, "IOC_LIBCFS_PANIC failed: %s\n",
-                       strerror(errno));
-               return -1;
-       }
-       return 0;
-}