mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.
Sponsored by: DARPA & NAI Labs
This commit is contained in:
parent
674a5ae34f
commit
2dd527b3ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94182
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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_ */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user