Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.

Sponsored by:	DARPA & NAI Labs
This commit is contained in:
Poul-Henning Kamp 2002-04-08 09:20:07 +00:00
parent 674a5ae34f
commit 2dd527b3ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94182
12 changed files with 28 additions and 27 deletions

View file

@ -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;

View file

@ -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

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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_ */

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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>