|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 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: /* ! 44: * Disk description table, see disktab(5) ! 45: */ ! 46: #ifndef _KERNEL ! 47: #define DISKTAB "/etc/disktab" ! 48: #endif /* !_KERNEL */ ! 49: ! 50: #define MAXDNMLEN 24 // drive name length ! 51: #define MAXMPTLEN 16 // mount point length ! 52: #define MAXFSTLEN 8 // file system type length ! 53: #define MAXTYPLEN 24 // drive type length ! 54: #define NBOOTS 2 // # of boot blocks ! 55: #define MAXBFLEN 24 // bootfile name length ! 56: #define MAXHNLEN 32 // host name length ! 57: #define NPART 8 // # of partitions ! 58: ! 59: typedef struct partition { ! 60: int p_base; /* base sector# of partition */ ! 61: int p_size; /* #sectors in partition */ ! 62: short p_bsize; /* block size in bytes */ ! 63: short p_fsize; /* frag size in bytes */ ! 64: char p_opt; /* 's'pace/'t'ime optimization pref */ ! 65: short p_cpg; /* cylinders per group */ ! 66: short p_density; /* bytes per inode density */ ! 67: char p_minfree; /* minfree (%) */ ! 68: char p_newfs; /* run newfs during init */ ! 69: char p_mountpt[MAXMPTLEN];/* mount point */ ! 70: char p_automnt; /* auto-mount when inserted */ ! 71: char p_type[MAXFSTLEN];/* file system type */ ! 72: } partition_t; ! 73: ! 74: typedef struct disktab { ! 75: char d_name[MAXDNMLEN]; /* drive name */ ! 76: char d_type[MAXTYPLEN]; /* drive type */ ! 77: int d_secsize; /* sector size in bytes */ ! 78: int d_ntracks; /* # tracks/cylinder */ ! 79: int d_nsectors; /* # sectors/track */ ! 80: int d_ncylinders; /* # cylinders */ ! 81: int d_rpm; /* revolutions/minute */ ! 82: short d_front; /* size of front porch (sectors) */ ! 83: short d_back; /* size of back porch (sectors) */ ! 84: short d_ngroups; /* number of alt groups */ ! 85: short d_ag_size; /* alt group size (sectors) */ ! 86: short d_ag_alts; /* alternate sectors / alt group */ ! 87: short d_ag_off; /* sector offset to first alternate */ ! 88: int d_boot0_blkno[NBOOTS]; /* "blk 0" boot locations */ ! 89: char d_bootfile[MAXBFLEN]; /* default bootfile */ ! 90: char d_hostname[MAXHNLEN]; /* host name */ ! 91: char d_rootpartition; /* root partition e.g. 'a' */ ! 92: char d_rwpartition; /* r/w partition e.g. 'b' */ ! 93: partition_t d_partitions[NPART]; ! 94: } disktab_t; ! 95: ! 96: #ifndef _KERNEL ! 97: struct disktab *getdiskbyname(), *getdiskbydev(); ! 98: #endif /* !_KERNEL */ ! 99: ! 100: #endif /* _SYS_DISKTAB_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.