kdbm_acpi.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  kdbm_acpi.c - kdb debugger module interface for ACPI debugger
  3.  *
  4.  *  Copyright (C) 2000 Andrew Grover
  5.  *
  6.  *  This program is free software; you can redistribute it and/or modify
  7.  *  it under the terms of the GNU General Public License as published by
  8.  *  the Free Software Foundation; either version 2 of the License, or
  9.  *  (at your option) any later version.
  10.  *
  11.  *  This program is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  *  GNU General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU General Public License
  17.  *  along with this program; if not, write to the Free Software
  18.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19.  */
  20. #include <linux/types.h>
  21. #include <linux/kdb.h>
  22. #include <linux/module.h>
  23. #include "acpi.h"
  24. #include "acdebug.h"
  25. extern int acpi_in_debugger;
  26. static int
  27. kdbm_acpi(int argc, const char **argv, const char **envp, struct pt_regs *regs)
  28. {
  29. acpi_in_debugger = 1;
  30. acpi_db_user_commands(DB_COMMAND_PROMPT, NULL);
  31. acpi_in_debugger = 0;
  32. return 0;
  33. }
  34. int
  35. init_module(void)
  36. {
  37. kdb_register("acpi", kdbm_acpi, "", "Enter ACPI debugger", 0);
  38. return 0;
  39. }
  40. void
  41. cleanup_module(void)
  42. {
  43. kdb_unregister("acpi");
  44. }