2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
16 #include <sys/ioccom.h>
21 #include <sys/conf.h> /* XXX: temporary to avoid breakage */
24 void disk_err(struct bio *bp, const char *what, int blkdone, int nl);
28 #define DIOCGSECTORSIZE _IOR('d', 128, u_int)
30 * Get the sectorsize of the device in bytes. The sectorsize is the
31 * smallest unit of data which can be transfered from this device.
32 * Usually this is a power of two but it may not be. (ie: CDROM audio)
35 #define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */
37 * Get the size of the entire device in bytes. This should be a
38 * multiple of the sectorsize.
41 #define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */
43 * Get the firmwares notion of number of sectors per track. This
44 * value is mostly used for compatibility with various ill designed
45 * disk label formats. Don't use it unless you have to.
48 #define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */
50 * Get the firmwares notion of number of heads per cylinder. This
51 * value is mostly used for compatibility with various ill designed
52 * disk label formats. Don't use it unless you have to.
55 #define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */
57 * Enable/Disable (the argument is boolean) the device for kernel
61 #define DIOCGFRONTSTUFF _IOR('d', 134, off_t)
63 * Many disk formats have some amount of space reserved at the
64 * start of the disk to hold bootblocks, various disklabels and
65 * similar stuff. This ioctl returns the number of such bytes
66 * which may apply to the device.
69 #endif /* _SYS_DISK_H_ */