Add a acpicall(8) utility for debugging and tweaking purposes.
authorSascha Wildner <saw@online.de>
Mon, 31 Aug 2015 18:01:31 +0000 (20:01 +0200)
committerSascha Wildner <saw@online.de>
Mon, 31 Aug 2015 18:01:31 +0000 (20:01 +0200)
commit279dd84605c1020984e2902ccf89d0d0c2dd8f2f
tree6dce87c6a33725c712c8f17e51a24ba7196c7450
parentb5b45574b1a9e411d59138bb0f99663be5618bac
Add a acpicall(8) utility for debugging and tweaking purposes.

It is based on ports' sysutils/acpi_call (from Maxim Ignatenko) with
a few changes by me:

* Rename acpi_call -> acpicall.

* Ioctl handling is in the main acpi.ko module.

* To enable it, the debug.acpi.allow_method_calls tunable needs to
  be set.

* In acpi_call, the mandatory -p option was used to pass the method's
  namespace path. I removed the option and made the path acpicall(8)'s
  argument.

* Wrote a manual page and cleaned up a bit.

The separate acpiio_mcall.h file was added because ACPIIO_DO_MCALL's
argument struct uses ACPICA types, so it needs acpi.h which acpiio.h
(a public header used by some ports) so far didn't need. So to avoid
any hassle, I put the ACPIIO_DO_MCALL ioctl into a separate header
(it's only used by acpicall(8) anyway).

The changes to kdump(1) and truss(1) are to include and build with
acpi.h.

Tested-by: tollens
18 files changed:
share/man/man4/acpi.4
sys/dev/acpica/acpi.c
sys/dev/acpica/acpiio_mcall.h [new file with mode: 0644]
usr.bin/kdump/Makefile
usr.bin/kdump/mkioctls
usr.bin/truss/Makefile
usr.sbin/acpi/Makefile
usr.sbin/acpi/acpibin/acpibin.8
usr.sbin/acpi/acpicall/Makefile [new file with mode: 0644]
usr.sbin/acpi/acpicall/acpicall.8 [copied from usr.sbin/acpi/acpihelp/acpihelp.8 with 52% similarity]
usr.sbin/acpi/acpicall/acpicall.c [new file with mode: 0644]
usr.sbin/acpi/acpiconf/acpiconf.8
usr.sbin/acpi/acpidump/acpidump.8
usr.sbin/acpi/acpiexec/acpiexec.8
usr.sbin/acpi/acpihelp/acpihelp.8
usr.sbin/acpi/acpinames/acpinames.8
usr.sbin/acpi/acpixtract/acpixtract.8
usr.sbin/acpi/iasl/iasl.8