summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-08-21 21:31:27 +0000
committerimp <imp@FreeBSD.org>2001-08-21 21:31:27 +0000
commit01d34df527bc72e6c98729035cd1f1ebc2afbe6c (patch)
tree3338bf8bda1a29fab0f8b8aa4d2bb6332a3f68e2 /sys/pccard/pcic_pci.c
parent5b25e70c26430793468251e9a9f0505d225db1c6 (diff)
downloadFreeBSD-src-01d34df527bc72e6c98729035cd1f1ebc2afbe6c.zip
FreeBSD-src-01d34df527bc72e6c98729035cd1f1ebc2afbe6c.tar.gz
Report the interrupt path via the sysctl to userland as a string.
Submitted by: green
Diffstat (limited to 'sys/pccard/pcic_pci.c')
-rw-r--r--sys/pccard/pcic_pci.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 0534cfb..6b450b8 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -73,11 +73,25 @@ SYSCTL_INT(_hw_pcic, OID_AUTO, ignore_function_1, CTLFLAG_RD,
* routing doesn't work. It is purposely vague and undocumented
* at the moment.
*/
-static int pcic_intr_path = (int) pcic_iw_pci;
+static int pcic_intr_path = (int)pcic_iw_pci;
TUNABLE_INT("hw.pcic.intr_path", &pcic_intr_path);
-SYSCTL_INT(_hw_pcic, OID_AUTO, intr_path, CTLFLAG_RD,
- &pcic_intr_path, (int) pcic_iw_pci,
- "Which path to send the interrupts over. 1 -- isa, 2 -- pci");
+
+static int
+sysctl_hw_pcic_intr_path(SYSCTL_HANDLER_ARGS)
+{
+ char type[4];
+ int error;
+
+ if (pcic_intr_path == pcic_iw_isa)
+ strcpy(type, "isa");
+ else
+ strcpy(type, "pci");
+ error = sysctl_handle_string(oidp, type, sizeof(type), req);
+ return (error);
+}
+
+SYSCTL_PROC(_hw_pcic, OID_AUTO, intr_path, CTLTYPE_STRING | CTLFLAG_RD, 0, 0,
+ sysctl_hw_pcic_intr_path, "A", "Which path to send the interrupts over.");
static int pcic_init_routing = 0;
TUNABLE_INT("hw.pcic.init_routing", &pcic_init_routing);
OpenPOWER on IntegriCloud