summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
committerphk <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
commitd0c66446cc835afd7c554f93568beda34a3cbba0 (patch)
tree3c18ee3a32f49eafefcfca9b38f0533552958ab7 /sys/pci/pci.c
parent7921cd5a326a4e25ea8f8e1c4da15f46710544e6 (diff)
downloadFreeBSD-src-d0c66446cc835afd7c554f93568beda34a3cbba0.zip
FreeBSD-src-d0c66446cc835afd7c554f93568beda34a3cbba0.tar.gz
Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 50337e5..a14c96f 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.31 1995/09/14 23:24:29 se Exp $
+** $Id: pci.c,v 1.32 1995/10/02 13:43:11 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -51,6 +51,7 @@
#include <sys/malloc.h>
#include <sys/errno.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/proc.h> /* declaration of wakeup(), used by vm.h */
#include <sys/devconf.h>
@@ -109,11 +110,9 @@ struct pcicb {
u_long pcicb_p_memlimit;
};
-static int
-pci_externalize (struct proc *, struct kern_devconf *, void *, size_t);
+static int pci_externalize (struct kern_devconf *, struct sysctl_req *);
-static int
-pci_internalize (struct proc *, struct kern_devconf *, void *, size_t);
+static int pci_internalize (struct kern_devconf *, struct sysctl_req *);
static void
not_supported (pcici_t tag, u_long type);
@@ -1091,17 +1090,13 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
*/
static int
-pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
+pci_externalize (struct kern_devconf *kdcp, struct sysctl_req *req)
{
struct pci_externalize_buffer buffer;
struct pci_info * pip = kdcp->kdc_parentdata;
pcici_t tag;
int i;
- if (l < sizeof buffer) {
- return ENOMEM;
- };
-
tag = pcibus->pb_tag (pip->pi_bus, pip->pi_device, 0);
buffer.peb_pci_info = *pip;
@@ -1110,12 +1105,12 @@ pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
buffer.peb_config[i] = pcibus->pb_read (tag, i*4);
};
- return copyout(&buffer, u, sizeof buffer);
+ return SYSCTL_OUT(req, &buffer, sizeof buffer);
}
static int
-pci_internalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t s)
+pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
{
return EOPNOTSUPP;
}
OpenPOWER on IntegriCloud