summaryrefslogtreecommitdiffstats
path: root/sys/sys/disk.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-04-09 15:09:54 +0000
committerphk <phk@FreeBSD.org>2002-04-09 15:09:54 +0000
commit661e748444dd0c635332a2a89b70c284676dbcf2 (patch)
treeb7bf991055ea5d5740e3aed7acbac967769ada65 /sys/sys/disk.h
parent85c5499d6f4e6ffb4430b6eca8eccbb80fe3042d (diff)
downloadFreeBSD-src-661e748444dd0c635332a2a89b70c284676dbcf2.zip
FreeBSD-src-661e748444dd0c635332a2a89b70c284676dbcf2.tar.gz
Describe the generic disk ioctls in some detail.
Sponsored by: DARPA & NAI Labs
Diffstat (limited to 'sys/sys/disk.h')
-rw-r--r--sys/sys/disk.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/sys/sys/disk.h b/sys/sys/disk.h
index 2239189..a0fbb0d 100644
--- a/sys/sys/disk.h
+++ b/sys/sys/disk.h
@@ -47,10 +47,37 @@ void disk_invalidate(struct disk *disk);
#endif
-#define DIOCGSECTORSIZE _IOR('d', 128, u_int) /* Get sector size in bytes */
+#define DIOCGSECTORSIZE _IOR('d', 128, u_int)
+ /*-
+ * Get the sectorsize of the device in bytes. The sectorsize is the
+ * smallest unit of data which can be transfered from this device.
+ * Usually this is a power of two but it may not be. (ie: CDROM audio)
+ */
+
#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */
+ /*-
+ * Get the size of the entire device in bytes. This should be a
+ * multiple of the sectorsize.
+ */
+
#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */
+ /*-
+ * Get the firmwares notion of number of sectors per track. This
+ * value is mostly used for compatibility with various ill designed
+ * disk label formats. Don't use it unless you have to.
+ */
+
#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */
-#define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */
+ /*-
+ * Get the firmwares notion of number of heads per cylinder. This
+ * value is mostly used for compatibility with various ill designed
+ * disk label formats. Don't use it unless you have to.
+ */
+#define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */
+ /*-
+ * Enable/Disable (the argument is boolean) the device for kernel
+ * core dumps.
+ */
+
#endif /* _SYS_DISK_H_ */
OpenPOWER on IntegriCloud