diff options
-rw-r--r-- | sbin/dumpon/dumpon.c | 2 | ||||
-rw-r--r-- | sbin/savecore/savecore.c | 2 | ||||
-rw-r--r-- | sys/dev/ccd/ccd.c | 2 | ||||
-rw-r--r-- | sys/dev/null/null.c | 2 | ||||
-rw-r--r-- | sys/dev/vinum/vinumhdr.h | 1 | ||||
-rw-r--r-- | sys/geom/geom_ccd.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_diskslice.c | 1 | ||||
-rw-r--r-- | sys/sys/disk.h | 11 | ||||
-rw-r--r-- | sys/sys/disklabel.h | 10 | ||||
-rw-r--r-- | sys/sys/diskmbr.h | 10 | ||||
-rw-r--r-- | sys/sys/diskpc98.h | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 2 |
12 files changed, 28 insertions, 27 deletions
diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index 2c4d4a4..a0b9114 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -52,7 +52,7 @@ static const char rcsid[] = #include <paths.h> #include <unistd.h> #include <sys/param.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <sysexits.h> void usage(void) __dead2; diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 078bb3a..47f11f6 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -44,7 +44,7 @@ #include <time.h> #include <md5.h> #include <unistd.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <sys/kerneldump.h> static void diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 4c84a81..c9c9fa1 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -98,7 +98,7 @@ #include <sys/conf.h> #include <sys/stat.h> #include <sys/sysctl.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <ufs/ffs/fs.h> #include <sys/devicestat.h> #include <sys/fcntl.h> diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 043843d..6fa5e2b 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -33,7 +33,7 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/module.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <sys/bus.h> #include <machine/bus.h> #include <machine/resource.h> diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h index f9182a6..c5f7ab3 100644 --- a/sys/dev/vinum/vinumhdr.h +++ b/sys/dev/vinum/vinumhdr.h @@ -58,6 +58,7 @@ #include <sys/uio.h> #include <sys/namei.h> #include <sys/stat.h> +#include <sys/disk.h> #include <sys/disklabel.h> #include <ufs/ffs/fs.h> #include <sys/syslog.h> diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 4c84a81..c9c9fa1 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -98,7 +98,7 @@ #include <sys/conf.h> #include <sys/stat.h> #include <sys/sysctl.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <ufs/ffs/fs.h> #include <sys/devicestat.h> #include <sys/fcntl.h> diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index 85c1862..158ccbb 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -50,6 +50,7 @@ #include <sys/systm.h> #include <sys/bio.h> #include <sys/conf.h> +#include <sys/disk.h> #include <sys/disklabel.h> #include <sys/diskslice.h> #include <sys/fcntl.h> diff --git a/sys/sys/disk.h b/sys/sys/disk.h index 128e582..00eec8d 100644 --- a/sys/sys/disk.h +++ b/sys/sys/disk.h @@ -13,6 +13,9 @@ #ifndef _SYS_DISK_H_ #define _SYS_DISK_H_ +#include <sys/ioccom.h> + +#ifdef _KERNEL #ifndef _SYS_DISKSLICE_H_ #include <sys/diskslice.h> #endif /* _SYS_DISKSLICE_H_ */ @@ -42,4 +45,12 @@ void disk_destroy(dev_t dev); struct disk *disk_enumerate(struct disk *disk); void disk_invalidate(struct disk *disk); +#endif + +#define DIOCGSECTORSIZE _IOR('d', 128, u_int) /* Get sector size in bytes */ +#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ +#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ +#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ +#define DIOCGKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ + #endif /* _SYS_DISK_H_ */ diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 870e1a9..dde62e5 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -344,7 +344,9 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */ /* - * Disk-specific ioctls. + * Disklabel-specific ioctls. + * + * NB: <sys/disk.h> defines ioctls from 'd'/128 and up. */ /* get and set disklabel */ #define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */ @@ -354,12 +356,6 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */ -#define DIOCGSECTORSIZE _IOR('d', 128, u_int) /* Get sector size in bytes */ -#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ -#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ -#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ -#define DIOCGKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - #ifdef __alpha__ struct disklabel_alphahack { struct disklabel dl; diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 870e1a9..dde62e5 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -344,7 +344,9 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */ /* - * Disk-specific ioctls. + * Disklabel-specific ioctls. + * + * NB: <sys/disk.h> defines ioctls from 'd'/128 and up. */ /* get and set disklabel */ #define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */ @@ -354,12 +356,6 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */ -#define DIOCGSECTORSIZE _IOR('d', 128, u_int) /* Get sector size in bytes */ -#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ -#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ -#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ -#define DIOCGKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - #ifdef __alpha__ struct disklabel_alphahack { struct disklabel dl; diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h index 870e1a9..dde62e5 100644 --- a/sys/sys/diskpc98.h +++ b/sys/sys/diskpc98.h @@ -344,7 +344,9 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */ /* - * Disk-specific ioctls. + * Disklabel-specific ioctls. + * + * NB: <sys/disk.h> defines ioctls from 'd'/128 and up. */ /* get and set disklabel */ #define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */ @@ -354,12 +356,6 @@ CTASSERT(sizeof (struct dos_partition) == 16); #define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */ -#define DIOCGSECTORSIZE _IOR('d', 128, u_int) /* Get sector size in bytes */ -#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ -#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ -#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ -#define DIOCGKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - #ifdef __alpha__ struct disklabel_alphahack { struct disklabel dl; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index dc60f4e..e459543 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -48,7 +48,7 @@ #include <sys/buf.h> #include <sys/conf.h> #include <sys/fcntl.h> -#include <sys/disklabel.h> +#include <sys/disk.h> #include <sys/malloc.h> #include <sys/mutex.h> |