* 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];
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;
-}