Whamcloud - gitweb
i=wangdi,i=rread,b=19920:
[fs/lustre-release.git] / lnet / utils / debugctl.c
index 02cb9b4..fafb7e9 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
+ * Copyright  2008 Sun Microsystems, Inc. All rights reserved
  *
  *   This file is part of Portals, http://www.sf.net/projects/lustre/
  *
  *
  * Some day I'll split all of this functionality into a cfs_debug module
  * of its own.  That day is not today.
- *
  */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <portals/api-support.h>
-#include <portals/ptlctl.h>
+#include <lnet/api-support.h>
+#include <lnet/lnetctl.h>
 #include "parser.h"
 
 
 command_t list[] = {
         {"debug_kernel", jt_dbg_debug_kernel, 0, "usage: debug_kernel [file] [raw], get debug buffer and print it [to a file]"},
-        {"debug_daemon", jt_dbg_debug_daemon, 0, "usage: debug_daemon [start file [#MB]|stop|pause|continue], control debug daemon to dump debug buffer to a file"}, 
+        {"debug_daemon", jt_dbg_debug_daemon, 0, "usage: debug_daemon [start file|stop], control debug daemon to dump debug buffer to a file"}, 
         {"debug_file", jt_dbg_debug_file, 0, "usage: debug_file <input> [output] [raw], read debug buffer from input and print it [to output]"},
         {"clear", jt_dbg_clear_debug_buf, 0, "clear kernel debug buffer"},
         {"mark", jt_dbg_mark_debug_buf, 0, "insert a marker into the kernel debug buffer (args: [marker text])"},
@@ -53,7 +52,8 @@ int main(int argc, char **argv)
         if (dbg_initialize(argc, argv) < 0)
                 exit(2);
 
-        register_ioc_dev(PORTALS_DEV_ID, PORTALS_DEV_PATH);
+        register_ioc_dev(LNET_DEV_ID, LNET_DEV_PATH, 
+                         LNET_DEV_MAJOR, LNET_DEV_MINOR);
 
         Parser_init("debugctl > ", list);
         if (argc > 1)
@@ -61,6 +61,6 @@ int main(int argc, char **argv)
 
         Parser_commands();
 
-        unregister_ioc_dev(PORTALS_DEV_ID);
+        unregister_ioc_dev(LNET_DEV_ID);
         return 0;
 }