diff options
author | phk <phk@FreeBSD.org> | 1996-09-06 23:11:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-06 23:11:42 +0000 |
commit | 57edefa8b20ff6c93d5a2418096d6ba6850dc954 (patch) | |
tree | e134166828a6b868f3f6fc85380bc6fae40762fd /sys | |
parent | bca885205da7f15208946f0896edc2eda3caff01 (diff) | |
download | FreeBSD-src-57edefa8b20ff6c93d5a2418096d6ba6850dc954.zip FreeBSD-src-57edefa8b20ff6c93d5a2418096d6ba6850dc954.tar.gz |
Remove these three devconf files entirely.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/include/devconf.h | 96 | ||||
-rw-r--r-- | sys/kern/kern_devconf.c | 0 | ||||
-rw-r--r-- | sys/sys/devconf.h | 150 |
3 files changed, 0 insertions, 246 deletions
diff --git a/sys/i386/include/devconf.h b/sys/i386/include/devconf.h deleted file mode 100644 index 8447539..0000000 --- a/sys/i386/include/devconf.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1994, Garrett A. Wollman. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id: devconf.h,v 1.13 1996/06/14 11:01:03 asami Exp $ - */ -/* - * devconf.h - machine-dependent device configuration table - * - * Garrett A. Wollman, October 1994. - */ - -#ifndef _MACHINE_DEVCONF_H_ -#define _MACHINE_DEVCONF_H_ 1 - -#define PARENTNAMELEN 32 - -#ifdef PC98 -enum machdep_devtype { MDDT_CPU, MDDT_ISA, MDDT_PCI, MDDT_SCSI, - MDDT_DISK, MDDT_BUS, NDEVTYPES }; -#else -enum machdep_devtype { MDDT_CPU, MDDT_ISA, MDDT_EISA, MDDT_PCI, MDDT_SCSI, - MDDT_DISK, MDDT_BUS, NDEVTYPES }; -#endif - -#ifdef PC98 -#define DEVTYPENAMES { \ - "cpu", \ - "pc98", \ - "pci", \ - "scsi", \ - "disk", \ - "bus", \ - 0 \ - } -#else -#define DEVTYPENAMES { \ - "cpu", \ - "isa", \ - "eisa", \ - "pci", \ - "scsi", \ - "disk", \ - "bus", \ - 0 \ - } -#endif - -struct machdep_devconf { - enum machdep_devtype mddc_devtype; - int mddc_flags; - char mddc_imask[4]; -}; - -#define MDDC_SCSI { MDDT_SCSI, 0 } -#define MDDC_SCBUS { MDDT_BUS, 0 } - -#define machdep_kdevconf machdep_devconf -#define MACHDEP_COPYDEV(dc, kdc) ((dc)->dc_md = (kdc)->kdc_md) - -#define dc_devtype dc_md.mddc_devtype -#define dc_flags dc_md.mddc_flags -#define kdc_isa kdc_parentdata -#define kdc_eisa kdc_parentdata -#define kdc_scsi kdc_parentdata - -#define CPU_EXTERNALLEN (0) -#define DISK_EXTERNALLEN (sizeof(int)) -#define BUS_EXTERNALLEN (0) - -#ifdef KERNEL /* XXX move this */ -struct sysctl_req; -extern int disk_externalize(int, struct sysctl_req *); -#endif - -#endif /* _MACHINE_DEVCONF_H_ */ diff --git a/sys/kern/kern_devconf.c b/sys/kern/kern_devconf.c deleted file mode 100644 index e69de29..0000000 --- a/sys/kern/kern_devconf.c +++ /dev/null diff --git a/sys/sys/devconf.h b/sys/sys/devconf.h deleted file mode 100644 index 1af5c06..0000000 --- a/sys/sys/devconf.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1994, Garrett A. Wollman. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id: devconf.h,v 1.7 1995/11/20 12:42:38 phk Exp $ - */ - -/* - * devconf.h - device configuration table - * - * Garrett A. Wollman, October 1994. - */ - -#ifndef _SYS_DEVCONF_H_ -#define _SYS_DEVCONF_H_ 1 - -#include <machine/devconf.h> - -#define MAXDEVNAME 32 -#define MAXDEVDESCR 64 - -enum dc_state { - DC_UNKNOWN = 0, /* don't know the state or driver doesn't support */ - DC_UNCONFIGURED, /* driver is present but not configured */ - DC_IDLE, /* driver supports state and is not in use */ - DC_BUSY /* driver supports state and is currently busy */ -}; - -#define DC_STATENAMES \ - { \ - "unknown", "unconfigured", "idle", "busy" \ - } - -enum dc_class { - DC_CLS_UNKNOWN = 0, /* old drivers don't set class */ - DC_CLS_CPU = 1, /* CPU devices */ - DC_CLS_BUS = 2, /* busses */ - DC_CLS_DISK = 4, /* disks */ - DC_CLS_TAPE = 8, /* tapes */ - DC_CLS_RDISK = 16, /* read-only disks */ - DC_CLS_DISPLAY = 32, /* display devices */ - DC_CLS_SERIAL = 64, /* serial I/O devices */ - DC_CLS_PARALLEL = 128, /* parallel I/O devices */ - DC_CLS_NETIF = 256, /* network interfaces */ - DC_CLS_MISC = 512 /* anything else */ -}; - -#define DC_CLASSNAMES \ - { \ - "unknown", "cpu", "bus", "disk", "tape", "rodisk", \ - "display", "serial", "parallel", "netif", \ - "misc" \ - } - -struct devconf { - char dc_name[MAXDEVNAME]; /* name */ - char dc_descr[MAXDEVDESCR]; /* description */ - int dc_unit; /* unit number */ - int dc_number; /* unique id */ - char dc_pname[MAXDEVNAME]; /* name of the parent device */ - int dc_punit; /* unit number of the parent */ - int dc_pnumber; /* unique id of the parent */ - struct machdep_devconf dc_md; /* machine-dependent stuff */ - enum dc_state dc_state; /* state of the device (see above) */ - enum dc_class dc_class; /* type of device (see above) */ - size_t dc_datalen; /* length of data */ - char dc_data[1]; /* variable-length data */ -}; - -#ifdef KERNEL - -struct kern_devconf; /* forward declaration */ - -/* - * These four routines are called from the generic configuration - * table code to allow devices to provide their information in a - * more useful form. - * - * EXTERNALIZE: convert internal representation to external and copy out - * into user space. - */ -struct sysctl_req; -typedef int (*kdc_externalize_t)(struct kern_devconf *, struct sysctl_req *); -/* - * INTERNALIZE: copy in from user space, convert to internal representation, - * validate, and set configuration. - */ -typedef int (*kdc_internalize_t)(struct kern_devconf *, struct sysctl_req *); -/* - * GOAWAY: shut the device down, if possible, and prepare to exit. - */ -typedef int (*kdc_shutdown_t)(struct kern_devconf *, int); - -struct kern_devconf { - struct kern_devconf *kdc_next; /* filled in by kern_devconf */ - struct kern_devconf **kdc_rlink; /* filled in by kern_devconf */ - int kdc_number; /* filled in by kern_devconf */ - const char *kdc_name; /* filled in by driver */ - int kdc_unit; /* filled in by driver */ - struct machdep_kdevconf kdc_md; /* filled in by driver */ - kdc_externalize_t kdc_externalize; /* filled in by driver */ - kdc_internalize_t kdc_internalize; /* filled in by driver */ - kdc_shutdown_t kdc_shutdown; /* filled in by driver */ - size_t kdc_datalen; /* filled in by driver */ - struct kern_devconf *kdc_parent; /* filled in by driver */ - void *kdc_parentdata; /* filled in by driver */ - enum dc_state kdc_state; /* filled in by driver dynamically */ - const char *kdc_description; /* filled in by driver; maybe dyn. */ - enum dc_class kdc_class; /* filled in by driver */ -}; - -extern struct kern_devconf *dc_list; - -int dev_attach(struct kern_devconf *); -int dev_detach(struct kern_devconf *); -int dev_shutdownall(int); - -#endif /* KERNEL */ - -/* - * HW_DEVCONF sysctl(3) identifiers - */ -#define DEVCONF_NUMBER 0 /* get number of devices */ -#define DEVCONF_MAXID 1 /* number of items (not really) */ - -#define HW_DEVCONF_NAMES { \ - { "number", CTLTYPE_INT }, \ -} - -#endif /* _SYS_DEVCONF_H_ */ |