diff options
author | bde <bde@FreeBSD.org> | 1996-09-21 14:59:43 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-21 14:59:43 +0000 |
commit | 9bcb122232e4319fd67ee59c7cd43611d5e2fc60 (patch) | |
tree | e03f53db0e9dc53fdad8b0a593af598744be17da /sys/sys | |
parent | 178a446971cddf750d684ed6f842b14faed1c64e (diff) | |
download | FreeBSD-src-9bcb122232e4319fd67ee59c7cd43611d5e2fc60.zip FreeBSD-src-9bcb122232e4319fd67ee59c7cd43611d5e2fc60.tar.gz |
Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:
- don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h>
instead. This was already done in 4.4Lite for the most important
ioctl headers. Header spam currently increases kernel build
times by 10-20%. There are more than 30000 #includes (not counting
duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
almost self-sufficient (some ioctl headers still need structs from
elsewhere).
- uniformized idempotency ifdefs. Copied the style in the 4.4Lite
ioctl headers.
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/cdio.h | 17 | ||||
-rw-r--r-- | sys/sys/chio.h | 14 | ||||
-rw-r--r-- | sys/sys/dataacq.h | 12 | ||||
-rw-r--r-- | sys/sys/disklabel.h | 13 | ||||
-rw-r--r-- | sys/sys/diskmbr.h | 13 | ||||
-rw-r--r-- | sys/sys/diskpc98.h | 13 | ||||
-rw-r--r-- | sys/sys/diskslice.h | 7 | ||||
-rw-r--r-- | sys/sys/fdcio.h | 12 | ||||
-rw-r--r-- | sys/sys/ftape.h | 10 | ||||
-rw-r--r-- | sys/sys/ioctl_meteor.h | 11 | ||||
-rw-r--r-- | sys/sys/joystick.h | 9 | ||||
-rw-r--r-- | sys/sys/mtio.h | 14 | ||||
-rw-r--r-- | sys/sys/random.h | 4 | ||||
-rw-r--r-- | sys/sys/scsiio.h | 13 | ||||
-rw-r--r-- | sys/sys/soundcard.h | 12 | ||||
-rw-r--r-- | sys/sys/tablet.h | 10 | ||||
-rw-r--r-- | sys/sys/vcmd.h | 10 | ||||
-rw-r--r-- | sys/sys/wormio.h | 11 |
18 files changed, 116 insertions, 89 deletions
diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h index 8019130..564ab66 100644 --- a/sys/sys/cdio.h +++ b/sys/sys/cdio.h @@ -1,8 +1,9 @@ /* * 16 Feb 93 Julian Elischer (julian@dialix.oz.au) * - * $Id: cdio.h,v 1.12 1996/02/02 20:41:11 ache Exp $ + * $Id: cdio.h,v 1.13 1996/02/03 14:19:13 ache Exp $ */ + /* <1> Fixed a conflict with ioctl usage. There were two different functions using code #25. Made file formatting consistent. @@ -20,10 +21,15 @@ 2-Apr-95 Frank Durda IV bsdmail@nemesis.lonestar.org */ - /* Shared between kernel & process */ -#ifndef _SYS_CDIO_H_ -#define _SYS_CDIO_H_ + +#ifndef _SYS_CDIO_H_ +#define _SYS_CDIO_H_ + +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> union msf_lba { struct { @@ -259,5 +265,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -#endif /* _SYS_CDIO_H_ */ - +#endif /* !_SYS_CDIO_H_ */ diff --git a/sys/sys/chio.h b/sys/sys/chio.h index a249ca1..a8dceb0 100644 --- a/sys/sys/chio.h +++ b/sys/sys/chio.h @@ -1,7 +1,7 @@ /* * 16 Feb 93 Julian Elischer ADDED for SCSI system * - * $Id: chio.h,v 1.5 1995/05/30 08:14:13 rgrimes Exp $ + * $Id: chio.h,v 1.6 1996/01/30 23:00:27 mpp Exp $ */ /* This is a "converted" mtio.h from 386BSD @@ -11,8 +11,14 @@ /* * Structures and definitions for changer io control commands */ -#ifndef _SYS_CHIO_H_ -#define _SYS_CHIO_H_ + +#ifndef _SYS_CHIO_H_ +#define _SYS_CHIO_H_ + +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> #define CH_INVERT 0x10000 #define CH_ADDR_MASK 0xffff @@ -89,4 +95,4 @@ struct chop { /* Changer IO control command */ #define CHIOOP _IOWR('c', 1, struct chop) /* do a mag tape op */ -#endif /*_SYS_CHIO_H*/ +#endif /* !_SYS_CHIO_H_ */ diff --git a/sys/sys/dataacq.h b/sys/sys/dataacq.h index 82d98e1..c5fe345 100644 --- a/sys/sys/dataacq.h +++ b/sys/sys/dataacq.h @@ -1,11 +1,11 @@ -#ifndef _SYS_DATAACQ_H_ -#define _SYS_DATAACQ_H_ - -#include <sys/ioccom.h> - /* Header for general data acquisition definitions. */ +#ifndef _SYS_DATAACQ_H_ +#define _SYS_DATAACQ_H_ + +#include <sys/ioccom.h> + /* Period in microseconds between analog I/O samples. */ #define AD_MICRO_PERIOD_SET _IOW('A', 1, long) @@ -31,4 +31,4 @@ #define AD_GAINS_SET _IO('A', 6) #define AD_GAINS_GET _IO('A', 7) -#endif /* _SYS_DATAACQ_H_ */ +#endif /* !_SYS_DATAACQ_H_ */ diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 3f8e4bc..9b00104 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -31,12 +31,15 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.22 1996/06/14 11:02:27 asami Exp $ + * $Id: disklabel.h,v 1.23 1996/09/20 17:39:32 bde Exp $ */ -#ifndef _SYS_DISKLABEL_H_ +#ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ +#ifndef KERNEL +#include <sys/types.h> +#endif #include <sys/ioccom.h> /* @@ -443,14 +446,10 @@ int writedisklabel __P((dev_t dev, void (*strat)(struct buf *bp), #endif /* LOCORE */ -#if !defined(KERNEL) && !defined(LOCORE) - -#include <sys/cdefs.h> - +#ifndef KERNEL __BEGIN_DECLS struct disklabel *getdiskbyname __P((const char *)); __END_DECLS - #endif #endif /* !_SYS_DISKLABEL_H_ */ diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 3f8e4bc..9b00104 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -31,12 +31,15 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.22 1996/06/14 11:02:27 asami Exp $ + * $Id: disklabel.h,v 1.23 1996/09/20 17:39:32 bde Exp $ */ -#ifndef _SYS_DISKLABEL_H_ +#ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ +#ifndef KERNEL +#include <sys/types.h> +#endif #include <sys/ioccom.h> /* @@ -443,14 +446,10 @@ int writedisklabel __P((dev_t dev, void (*strat)(struct buf *bp), #endif /* LOCORE */ -#if !defined(KERNEL) && !defined(LOCORE) - -#include <sys/cdefs.h> - +#ifndef KERNEL __BEGIN_DECLS struct disklabel *getdiskbyname __P((const char *)); __END_DECLS - #endif #endif /* !_SYS_DISKLABEL_H_ */ diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h index 3f8e4bc..9b00104 100644 --- a/sys/sys/diskpc98.h +++ b/sys/sys/diskpc98.h @@ -31,12 +31,15 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.22 1996/06/14 11:02:27 asami Exp $ + * $Id: disklabel.h,v 1.23 1996/09/20 17:39:32 bde Exp $ */ -#ifndef _SYS_DISKLABEL_H_ +#ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ +#ifndef KERNEL +#include <sys/types.h> +#endif #include <sys/ioccom.h> /* @@ -443,14 +446,10 @@ int writedisklabel __P((dev_t dev, void (*strat)(struct buf *bp), #endif /* LOCORE */ -#if !defined(KERNEL) && !defined(LOCORE) - -#include <sys/cdefs.h> - +#ifndef KERNEL __BEGIN_DECLS struct disklabel *getdiskbyname __P((const char *)); __END_DECLS - #endif #endif /* !_SYS_DISKLABEL_H_ */ diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 92b7c67..8786f5a 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -23,12 +23,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: diskslice.h,v 1.14 1996/07/23 07:46:59 asami Exp $ + * $Id: diskslice.h,v 1.15 1996/09/20 17:39:34 bde Exp $ */ -#ifndef _SYS_DISKSLICE_H_ +#ifndef _SYS_DISKSLICE_H_ #define _SYS_DISKSLICE_H_ +#ifndef KERNEL +#include <sys/types.h> +#endif #include <sys/ioccom.h> #define BASE_SLICE 2 diff --git a/sys/sys/fdcio.h b/sys/sys/fdcio.h index 2a9212b..1f6b6d5 100644 --- a/sys/sys/fdcio.h +++ b/sys/sys/fdcio.h @@ -24,14 +24,16 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * $Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp $ + * $Id: ioctl_fd.h,v 1.8 1996/01/30 22:54:34 mpp Exp $ */ -#ifndef _IOCTL_FD_H -#define _IOCTL_FD_H +#ifndef _MACHINE_IOCTL_FD_H_ +#define _MACHINE_IOCTL_FD_H_ +#ifndef KERNEL #include <sys/types.h> -#include <sys/ioctl.h> +#endif +#include <sys/ioccom.h> #define FD_FORMAT_VERSION 110 /* used to validate before formatting */ #define FD_MAX_NSEC 36 /* highest known number of spt - allow for */ @@ -120,4 +122,4 @@ struct fd_type { /* for some controllers 1MPBS instead */ #endif /* FDC_500KBPS */ -#endif /* !def _IOCTL_FD_H */ +#endif /* !_MACHINE_IOCTL_FD_H_ */ diff --git a/sys/sys/ftape.h b/sys/sys/ftape.h index eaad609..71bb73c 100644 --- a/sys/sys/ftape.h +++ b/sys/sys/ftape.h @@ -25,12 +25,10 @@ * ioctl functions added. */ -#ifndef _FTAPE_H_ -#define _FTAPE_H_ +#ifndef _SYS_FTAPE_H_ +#define _SYS_FTAPE_H_ -#ifndef _IOCTL_H_ -#include <sys/ioctl.h> -#endif +#include <sys/ioccom.h> /* Miscellaneous constant values */ #define QCV_BLKSIZE 1024 /* Size of a block */ @@ -219,4 +217,4 @@ typedef struct qic_fileset { UCHAR fs_dsize[4]; /* Data size */ } QIC_FileSet; -#endif /* _FTAPE_H_ */ +#endif /* !_SYS_FTAPE_H_ */ diff --git a/sys/sys/ioctl_meteor.h b/sys/sys/ioctl_meteor.h index f432550..919100f 100644 --- a/sys/sys/ioctl_meteor.h +++ b/sys/sys/ioctl_meteor.h @@ -32,10 +32,13 @@ * ioctl constants for Matrox Meteor Capture card. */ -#ifndef _MACHINE_IOCTL_METEOR_H -#define _MACHINE_IOCTL_METEOR_H +#ifndef _MACHINE_IOCTL_METEOR_H_ +#define _MACHINE_IOCTL_METEOR_H_ -#include <sys/ioctl.h> +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> struct meteor_capframe { short command; /* see below for valid METEORCAPFRM commands */ @@ -179,4 +182,4 @@ struct meteor_mem { caddr_t buf; /* The real space (virtual addr) */ } ; -#endif /* ifndef _MACHINE_IOCTL_METEOR_H */ +#endif /* !_MACHINE_IOCTL_METEOR_H_ */ diff --git a/sys/sys/joystick.h b/sys/sys/joystick.h index d070ac0..051d991e 100644 --- a/sys/sys/joystick.h +++ b/sys/sys/joystick.h @@ -1,8 +1,7 @@ -#ifndef _JOY_IOCTL_H_ -#define _JOY_IOCTL_H_ +#ifndef _MACHINE_JOYSTICK_H_ +#define _MACHINE_JOYSTICK_H_ -#include <sys/types.h> -#include <sys/ioctl.h> +#include <sys/ioccom.h> struct joystick { int x; @@ -18,4 +17,4 @@ struct joystick { #define JOY_GET_X_OFFSET _IOR('J', 5, int) /* get offset on X-axis */ #define JOY_GET_Y_OFFSET _IOR('J', 6, int) /* get offset on Y-axis */ -#endif /* _JOY_IOCTL_H_ */ +#endif /* !_MACHINE_JOYSTICK_H_ */ diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h index 78ea814..d01f28b 100644 --- a/sys/sys/mtio.h +++ b/sys/sys/mtio.h @@ -31,11 +31,16 @@ * SUCH DAMAGE. * * @(#)mtio.h 8.1 (Berkeley) 6/2/93 - * $Id: mtio.h,v 1.6 1996/01/08 12:26:15 joerg Exp $ + * $Id: mtio.h,v 1.7 1996/01/30 23:00:58 mpp Exp $ */ -#ifndef _SYS_MTIO_H_ -#define _SYS_MTIO_H_ 1 +#ifndef _SYS_MTIO_H_ +#define _SYS_MTIO_H_ + +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> /* * Structures and definitions for mag tape io control commands @@ -160,4 +165,5 @@ struct mtget { #define T_6250BPI 020 /* select 6250 bpi */ #define T_BADBPI 030 /* undefined selection */ #endif -#endif /* _SYS_MTIO_H_ */ + +#endif /* !_SYS_MTIO_H_ */ diff --git a/sys/sys/random.h b/sys/sys/random.h index 266cc91..c328d1b 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -1,7 +1,7 @@ /* * random.h -- A strong random number generator * - * $Id: random.h,v 1.6 1996/06/17 16:47:39 bde Exp $ + * $Id: random.h,v 1.7 1996/09/03 10:22:30 asami Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -47,7 +47,7 @@ * */ -#ifndef _MACHINE_RANDOM_H_ +#ifndef _MACHINE_RANDOM_H_ #define _MACHINE_RANDOM_H_ #include <sys/ioccom.h> diff --git a/sys/sys/scsiio.h b/sys/sys/scsiio.h index cc6291e..87c5d63 100644 --- a/sys/sys/scsiio.h +++ b/sys/sys/scsiio.h @@ -1,12 +1,13 @@ /* - * $Id: scsiio.h,v 1.4 1995/04/28 19:26:02 dufault Exp $ + * $Id: scsiio.h,v 1.5 1996/01/30 23:01:14 mpp Exp $ */ -#ifndef _SYS_SCSIIO_H_ -#define _SYS_SCSIIO_H_ - +#ifndef _SYS_SCSIIO_H_ +#define _SYS_SCSIIO_H_ +#ifndef KERNEL #include <sys/types.h> -#include <sys/ioctl.h> +#endif +#include <sys/ioccom.h> #define SENSEBUFLEN 48 @@ -66,4 +67,4 @@ struct scsi_addr { #define SCIOCFREEZETHAW _IOW('Q', 11, int) /* Freeze SCSI for some seconds */ #define SCIOCWAITTHAW _IO('Q', 12) /* Wait for SCSI to thaw */ -#endif /* _SYS_SCSIIO_H_ */ +#endif /* !_SYS_SCSIIO_H_ */ diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 3dcdaa1..666a4b8 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -1,5 +1,3 @@ -#ifndef SOUNDCARD_H -#define SOUNDCARD_H /* * Copyright by Hannu Savolainen 1993 * @@ -37,10 +35,13 @@ * hannu@voxware.pp.fi */ +#ifndef _MACHINE_SOUNDCARD_H_ +#define _MACHINE_SOUNDCARD_H_ + #define SOUND_VERSION 301 #define VOXWARE -#include <sys/ioctl.h> +#include <sys/ioccom.h> /* * Supported card ID numbers (Should be somewhere else?) @@ -1044,5 +1045,6 @@ void seqbuf_dump(void); /* This function must be provided by programs */ perror("Write patch: /dev/sequencer");} #define SEQ_WRPATCH2(patchx, len) (seqbuf_dump(), write(seqfd, (char*)(patchx), len)) -#endif -#endif +#endif /* !KERNEL_SPAM */ + +#endif /* !_MACHINE_SOUNDCARD_H_ */ diff --git a/sys/sys/tablet.h b/sys/sys/tablet.h index d6d9758..437287e 100644 --- a/sys/sys/tablet.h +++ b/sys/sys/tablet.h @@ -31,16 +31,20 @@ * SUCH DAMAGE. * * @(#)tablet.h 8.4 (Berkeley) 7/10/94 - * $Id: tablet.h,v 1.3 1996/03/11 02:15:32 hsu Exp $ + * $Id: tablet.h,v 1.4 1996/05/01 01:46:00 bde Exp $ */ -#ifndef _SYS_TABLET_H_ +#ifndef _SYS_TABLET_H_ #define _SYS_TABLET_H_ /* * Tablet line discipline. */ -#include <sys/ioctl.h> + +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> /* * Reads on the tablet return one of the following structures, depending on diff --git a/sys/sys/vcmd.h b/sys/sys/vcmd.h index 4d59e36..ff61b74 100644 --- a/sys/sys/vcmd.h +++ b/sys/sys/vcmd.h @@ -31,13 +31,13 @@ * SUCH DAMAGE. * * @(#)vcmd.h 8.1 (Berkeley) 6/2/93 - * $Id: vcmd.h,v 1.2 1994/08/02 07:54:09 davidg Exp $ + * $Id: vcmd.h,v 1.3 1994/08/21 04:42:12 paul Exp $ */ -#ifndef _SYS_VCMD_H_ -#define _SYS_VCMD_H_ +#ifndef _SYS_VCMD_H_ +#define _SYS_VCMD_H_ -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define VPRINT 0100 #define VPLOT 0200 @@ -46,4 +46,4 @@ #define VGETSTATE _IOR('v', 0, int) #define VSETSTATE _IOW('v', 1, int) -#endif +#endif /* !_SYS_VCMD_H_ */ diff --git a/sys/sys/wormio.h b/sys/sys/wormio.h index 38af90a..26477b2 100644 --- a/sys/sys/wormio.h +++ b/sys/sys/wormio.h @@ -1,6 +1,9 @@ /* Shared between kernel & process */ -#ifndef _SYS_WORMIO_H_ -#define _SYS_WORMIO_H_ + +#ifndef _SYS_WORMIO_H_ +#define _SYS_WORMIO_H_ + +#include <sys/ioccom.h> /***************************************************************\ * Ioctls for the WORM drive * @@ -57,6 +60,4 @@ struct wormio_fixation #define WORMIOCFIXATION _IOW('W', 22, struct wormio_fixation) - -#endif /* _SYS_WORMIO_H_ */ - +#endif /* !_SYS_WORMIO_H_ */ |