|
|
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: /* Copyright (c) 1991 by NeXT Computer, Inc. ! 26: * ! 27: * File: bsd/dev/disk_label.h - NeXT disk label definition. ! 28: * ! 29: * HISTORY ! 30: * 28-Mar-92 Doug Mitchell at NeXT ! 31: * Split out from <bsd/dev/disk.h>. ! 32: */ ! 33: ! 34: #ifndef _BSD_DEV_DISK_LABEL_ ! 35: #define _BSD_DEV_DISK_LABEL_ ! 36: ! 37: #import <bsd/sys/disktab.h> ! 38: ! 39: #define NLABELS 4 /* # of labels on a disk */ ! 40: #define MAXLBLLEN 24 /* dl_label[] size */ ! 41: #define NBAD 1670 /* sized to make label ~= 8KB */ ! 42: ! 43: /* ! 44: * if dl_version >= DL_V3 then the bad block table is relocated ! 45: * to a structure separate from the disk label. ! 46: */ ! 47: typedef union { ! 48: unsigned short DL_v3_checksum; ! 49: int DL_bad[NBAD]; /* block number that is bad */ ! 50: } dl_un_t; ! 51: ! 52: typedef struct disk_label { ! 53: int dl_version; // label version number ! 54: int dl_label_blkno; // block # where this label is ! 55: int dl_size; // size of media area (sectors) ! 56: char dl_label[MAXLBLLEN]; // media label ! 57: unsigned dl_flags; // flags (see DL_xxx, below) ! 58: unsigned dl_tag; // volume tag ! 59: struct disktab dl_dt; // common info in disktab ! 60: dl_un_t dl_un; ! 61: unsigned short dl_checksum; // ones complement checksum ! 62: ! 63: /* add things here so dl_checksum stays in a fixed place */ ! 64: } disk_label_t; ! 65: ! 66: /* ! 67: * Known label versions. ! 68: */ ! 69: #define DL_V1 0x4e655854 /* version #1: "NeXT" */ ! 70: #define DL_V2 0x646c5632 /* version #2: "dlV2" */ ! 71: #define DL_V3 0x646c5633 /* version #3: "dlV3" */ ! 72: #define DL_VERSION DL_V3 /* default version */ ! 73: ! 74: ! 75: /* ! 76: * dl_flags values ! 77: */ ! 78: #define DL_UNINIT 0x80000000 /* label is uninitialized */ ! 79: ! 80: /* ! 81: * Aliases for disktab fields ! 82: */ ! 83: #define dl_name dl_dt.d_name ! 84: #define dl_type dl_dt.d_type ! 85: #define dl_part dl_dt.d_partitions ! 86: #define dl_front dl_dt.d_front ! 87: #define dl_back dl_dt.d_back ! 88: #define dl_ngroups dl_dt.d_ngroups ! 89: #define dl_ag_size dl_dt.d_ag_size ! 90: #define dl_ag_alts dl_dt.d_ag_alts ! 91: #define dl_ag_off dl_dt.d_ag_off ! 92: #define dl_secsize dl_dt.d_secsize ! 93: #define dl_ncyl dl_dt.d_ncylinders ! 94: #define dl_nsect dl_dt.d_nsectors ! 95: #define dl_ntrack dl_dt.d_ntracks ! 96: #define dl_rpm dl_dt.d_rpm ! 97: #define dl_bootfile dl_dt.d_bootfile ! 98: #define dl_boot0_blkno dl_dt.d_boot0_blkno ! 99: #define dl_hostname dl_dt.d_hostname ! 100: #define dl_rootpartition dl_dt.d_rootpartition ! 101: #define dl_rwpartition dl_dt.d_rwpartition ! 102: ! 103: /* ! 104: * Other aliases ! 105: */ ! 106: #define dl_v3_checksum dl_un.DL_v3_checksum ! 107: #define dl_bad dl_un.DL_bad ! 108: ! 109: #endif /* _BSD_DEV_DISK_LABEL_ */ ! 110:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.