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/bsd/sys/disktab.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  * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
    3  *
    4  * @APPLE_LICENSE_HEADER_START@
    5  * 
    6  * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
    7  * 
    8  * This file contains Original Code and/or Modifications of Original Code
    9  * as defined in and that are subject to the Apple Public Source License
   10  * Version 2.0 (the 'License'). You may not use this file except in
   11  * compliance with the License. Please obtain a copy of the License at
   12  * http://www.opensource.apple.com/apsl/ and read it before using this
   13  * file.
   14  * 
   15  * The Original Code and all software distributed under the License are
   16  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   17  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   18  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   19  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   20  * Please see the License for the specific language governing rights and
   21  * limitations under the License.
   22  * 
   23  * @APPLE_LICENSE_HEADER_END@
   24  */
   25 /*
   26  * HISTORY:
   27  * 16-Mar-88  John Seamons (jks) at NeXT
   28  *      Cleaned up to support standard disk label definitions.
   29  *
   30  * 24-Feb-88  Mike DeMoney (mike) at NeXT
   31  *      Added d_boot0_blkno to indicate logical block number
   32  *      of "block 0" boot.  This blkno is in d_secsize sectors.
   33  *      Added d_bootfile to indicate the default operating system
   34  *      image to be booted by the blk 0 boot.
   35  *      Changed d_name and d_type to be char arrays rather than ptrs
   36  *      so they are part of label.  This limits length of info in
   37  *      /etc/disktab, sorry.
   38  */
   39 
   40 #ifndef _SYS_DISKTAB_
   41 #define _SYS_DISKTAB_
   42 
   43 #include <sys/appleapiopts.h>
   44 
   45 #ifdef  __APPLE_API_OBSOLETE
   46 
   47 /*
   48  * Disk description table, see disktab(5)
   49  */
   50 #ifndef KERNEL
   51 #define DISKTAB         "/etc/disktab"
   52 #endif  /* !KERNEL */
   53 
   54 #define MAXDNMLEN       24      // drive name length
   55 #define MAXMPTLEN       16      // mount point length
   56 #define MAXFSTLEN       8       // file system type length
   57 #define MAXTYPLEN       24      // drive type length
   58 #define NBOOTS          2       // # of boot blocks
   59 #define MAXBFLEN        24      // bootfile name length
   60 #define MAXHNLEN        32      // host name length
   61 #define NPART           8       // # of partitions
   62 
   63 typedef struct partition {
   64         int     p_base;         /* base sector# of partition */
   65         int     p_size;         /* #sectors in partition */
   66         short   p_bsize;        /* block size in bytes */
   67         short   p_fsize;        /* frag size in bytes */
   68         char    p_opt;          /* 's'pace/'t'ime optimization pref */
   69         short   p_cpg;          /* cylinders per group */
   70         short   p_density;      /* bytes per inode density */
   71         char    p_minfree;      /* minfree (%) */
   72         char    p_newfs;        /* run newfs during init */
   73         char    p_mountpt[MAXMPTLEN];/* mount point */
   74         char    p_automnt;      /* auto-mount when inserted */
   75         char    p_type[MAXFSTLEN];/* file system type */
   76 } partition_t;
   77 
   78 typedef struct disktab {
   79         char    d_name[MAXDNMLEN];      /* drive name */
   80         char    d_type[MAXTYPLEN];      /* drive type */
   81         int     d_secsize;              /* sector size in bytes */
   82         int     d_ntracks;              /* # tracks/cylinder */
   83         int     d_nsectors;             /* # sectors/track */
   84         int     d_ncylinders;           /* # cylinders */
   85         int     d_rpm;                  /* revolutions/minute */
   86         short   d_front;                /* size of front porch (sectors) */
   87         short   d_back;                 /* size of back porch (sectors) */
   88         short   d_ngroups;              /* number of alt groups */
   89         short   d_ag_size;              /* alt group size (sectors) */
   90         short   d_ag_alts;              /* alternate sectors / alt group */
   91         short   d_ag_off;               /* sector offset to first alternate */
   92         int     d_boot0_blkno[NBOOTS];  /* "blk 0" boot locations */
   93         char    d_bootfile[MAXBFLEN];   /* default bootfile */
   94         char    d_hostname[MAXHNLEN];   /* host name */
   95         char    d_rootpartition;        /* root partition e.g. 'a' */
   96         char    d_rwpartition;          /* r/w partition e.g. 'b' */
   97         partition_t d_partitions[NPART];
   98 } disktab_t;
   99 
  100 #ifndef KERNEL
  101 struct  disktab *getdiskbyname(), *getdiskbydev();
  102 #endif  /* !KERNEL */
  103 
  104 #endif  /* __APPLE_API_OBSOLETE */
  105 
  106 #endif  /* _SYS_DISKTAB_ */

Cache object: 32df3dcc4768f0bc6edfcfa1549bd17e


[ 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.