Annotation of sys/arch/sgi/include/disklabel.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: disklabel.h,v 1.5 2007/06/20 18:15:45 deraadt Exp $ */
! 2:
! 3: /*
! 4: * Copyright (c) 1994 Christopher G. Demetriou
! 5: * All rights reserved.
! 6: *
! 7: * Redistribution and use in source and binary forms, with or without
! 8: * modification, are permitted provided that the following conditions
! 9: * are met:
! 10: * 1. Redistributions of source code must retain the above copyright
! 11: * notice, this list of conditions and the following disclaimer.
! 12: * 2. Redistributions in binary form must reproduce the above copyright
! 13: * notice, this list of conditions and the following disclaimer in the
! 14: * documentation and/or other materials provided with the distribution.
! 15: * 3. All advertising materials mentioning features or use of this software
! 16: * must display the following acknowledgement:
! 17: * This product includes software developed by Christopher G. Demetriou.
! 18: * 4. The name of the author may not be used to endorse or promote products
! 19: * derived from this software without specific prior written permission
! 20: *
! 21: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 22: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 23: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 24: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 25: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 26: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 27: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 28: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 29: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 30: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 31: */
! 32:
! 33: #ifndef _MACHINE_DISKLABEL_H_
! 34: #define _MACHINE_DISKLABEL_H_
! 35:
! 36: #define LABELSECTOR 1
! 37: #define LABELOFFSET 0
! 38: #define MAXPARTITIONS 16 /* number of partitions */
! 39:
! 40: /* SGI */
! 41: struct devparms {
! 42: u_int8_t dp_skew;
! 43: u_int8_t dp_gap1;
! 44: u_int8_t dp_gap2;
! 45: u_int8_t dp_spares_cyl;
! 46: u_int16_t dp_cyls;
! 47: u_int16_t dp_shd0;
! 48: u_int16_t dp_trks0;
! 49: u_int8_t dp_ctq_depth;
! 50: u_int8_t dp_cylshi;
! 51: u_int16_t dp_unused;
! 52: u_int16_t dp_secs;
! 53: u_int16_t dp_secbytes;
! 54: u_int16_t dp_interleave;
! 55: u_int32_t dp_flags;
! 56: u_int32_t dp_datarate;
! 57: u_int32_t dp_nretries;
! 58: u_int32_t dp_mspw;
! 59: u_int16_t dp_xgap1;
! 60: u_int16_t dp_xsync;
! 61: u_int16_t dp_xrdly;
! 62: u_int16_t dp_xgap2;
! 63: u_int16_t dp_xrgate;
! 64: u_int16_t dp_xwcont;
! 65: } __packed;
! 66:
! 67: struct sgilabel {
! 68: #define SGILABEL_MAGIC 0xbe5a941
! 69: u_int32_t magic;
! 70: int16_t root;
! 71: int16_t swap;
! 72: char bootfile[16];
! 73: struct devparms dp;
! 74: struct {
! 75: char name[8];
! 76: int32_t block;
! 77: int32_t bytes;
! 78: } voldir[15];
! 79: struct {
! 80: int32_t blocks;
! 81: int32_t first;
! 82: int32_t type;
! 83: } partitions[MAXPARTITIONS];
! 84: int32_t checksum;
! 85: int32_t _pad;
! 86: } __packed;
! 87:
! 88: #define SGI_PTYPE_VOLHDR 0
! 89: #define SGI_PTYPE_RAW 3
! 90: #define SGI_PTYPE_BSD 4
! 91: #define SGI_PTYPE_VOLUME 6
! 92: #define SGI_PTYPE_EFS 7
! 93: #define SGI_PTYPE_LVOL 8
! 94: #define SGI_PTYPE_RLVOL 9
! 95: #define SGI_PTYPE_XFS 10
! 96: #define SGI_PTYPE_XFSLOG 11
! 97: #define SGI_PTYPE_XLV 12
! 98: #define SGI_PTYPE_XVM 13
! 99:
! 100: #endif /* _MACHINE_DISKLABEL_H_ */
CVSweb