The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/disk.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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: src/sys/sys/disk.h,v 1.39.6.1 2005/01/31 23:26:56 imp Exp $
   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: d3db485cf44abd33e359cc88a2511549


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.