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