FreeBSD/Linux Kernel Cross Reference
sys/sys/disk.h
1 /*
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 * ----------------------------------------------------------------------------
8 *
9 * $FreeBSD: releng/5.2/sys/sys/disk.h 112950 2003-04-01 18:55:04Z phk $
10 *
11 */
12
13 #ifndef _SYS_DISK_H_
14 #define _SYS_DISK_H_
15
16 #include <sys/ioccom.h>
17
18 #ifdef _KERNEL
19
20 #ifndef _SYS_CONF_H_
21 #include <sys/conf.h> /* XXX: temporary to avoid breakage */
22 #endif
23
24 struct disk;
25 struct disk *disk_enumerate(struct disk *disk);
26 void disk_err(struct bio *bp, const char *what, int blkdone, int nl);
27
28 #endif
29
30 #define DIOCGSECTORSIZE _IOR('d', 128, u_int)
31 /*-
32 * Get the sectorsize of the device in bytes. The sectorsize is the
33 * smallest unit of data which can be transfered from this device.
34 * Usually this is a power of two but it may not be. (ie: CDROM audio)
35 */
36
37 #define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */
38 /*-
39 * Get the size of the entire device in bytes. This should be a
40 * multiple of the sectorsize.
41 */
42
43 #define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */
44 /*-
45 * Get the firmwares notion of number of sectors per track. This
46 * value is mostly used for compatibility with various ill designed
47 * disk label formats. Don't use it unless you have to.
48 */
49
50 #define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */
51 /*-
52 * Get the firmwares notion of number of heads per cylinder. This
53 * value is mostly used for compatibility with various ill designed
54 * disk label formats. Don't use it unless you have to.
55 */
56
57 #define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */
58 /*-
59 * Enable/Disable (the argument is boolean) the device for kernel
60 * core dumps.
61 */
62
63 #define DIOCGFRONTSTUFF _IOR('d', 134, off_t)
64 /*-
65 * Many disk formats have some amount of space reserved at the
66 * start of the disk to hold bootblocks, various disklabels and
67 * similar stuff. This ioctl returns the number of such bytes
68 * which may apply to the device.
69 */
70
71 #endif /* _SYS_DISK_H_ */
Cache object: aef5925ca4a870f5ee4d436e6987d7e3
|