1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate 23*0Sstevel@tonic-gate /* 24*0Sstevel@tonic-gate * Copyright (c) 1991-2001 by Sun Microsystems, Inc. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _STARTUP_H 28*0Sstevel@tonic-gate #define _STARTUP_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifdef __cplusplus 33*0Sstevel@tonic-gate extern "C" { 34*0Sstevel@tonic-gate #endif 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate /* 37*0Sstevel@tonic-gate * This file contains declarations pertaining to reading the data file. 38*0Sstevel@tonic-gate */ 39*0Sstevel@tonic-gate /* 40*0Sstevel@tonic-gate * The definitions are the token types that the data file parser recognizes. 41*0Sstevel@tonic-gate */ 42*0Sstevel@tonic-gate #define SUP_EOF -1 /* eof token */ 43*0Sstevel@tonic-gate #define SUP_STRING 0 /* string token */ 44*0Sstevel@tonic-gate #define SUP_EQL 1 /* equals token */ 45*0Sstevel@tonic-gate #define SUP_COMMA 2 /* comma token */ 46*0Sstevel@tonic-gate #define SUP_COLON 3 /* colon token */ 47*0Sstevel@tonic-gate #define SUP_EOL 4 /* newline token */ 48*0Sstevel@tonic-gate #define SUP_OR 5 /* vertical bar */ 49*0Sstevel@tonic-gate #define SUP_AND 6 /* ampersand */ 50*0Sstevel@tonic-gate #define SUP_TILDE 7 /* tilde */ 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate /* 53*0Sstevel@tonic-gate * These definitions are flags for the legal keywords in the data file. 54*0Sstevel@tonic-gate * They are used to keep track of what parameters appear on the current 55*0Sstevel@tonic-gate * line in the file. 56*0Sstevel@tonic-gate */ 57*0Sstevel@tonic-gate #define SUP_CTLR 0x00000001 /* set ctlr */ 58*0Sstevel@tonic-gate #define SUP_DISK 0x00000002 /* set disk */ 59*0Sstevel@tonic-gate #define SUP_NCYL 0x00000004 /* set ncyl */ 60*0Sstevel@tonic-gate #define SUP_ACYL 0x00000008 /* set acyl */ 61*0Sstevel@tonic-gate #define SUP_PCYL 0x00000010 /* set pcyl */ 62*0Sstevel@tonic-gate #define SUP_NHEAD 0x00000020 /* set nhead */ 63*0Sstevel@tonic-gate #define SUP_NSECT 0x00000040 /* set nsect */ 64*0Sstevel@tonic-gate #define SUP_RPM 0x00000080 /* set rpm */ 65*0Sstevel@tonic-gate #define SUP_BPT 0x00000100 /* set bytes/track */ 66*0Sstevel@tonic-gate #define SUP_BPS 0x00000200 /* set bytes/sector */ 67*0Sstevel@tonic-gate #define SUP_DRTYPE 0x00000400 /* set drive type */ 68*0Sstevel@tonic-gate 69*0Sstevel@tonic-gate #define SUP_READ_RETRIES 0x00000800 /* set read retries */ 70*0Sstevel@tonic-gate #define SUP_WRITE_RETRIES 0x00001000 /* set write retries */ 71*0Sstevel@tonic-gate 72*0Sstevel@tonic-gate #define SUP_TRKS_ZONE 0x00002000 /* set tracks/zone */ 73*0Sstevel@tonic-gate #define SUP_ATRKS 0x00004000 /* set alt. tracks */ 74*0Sstevel@tonic-gate #define SUP_ASECT 0x00008000 /* set sectors/zone */ 75*0Sstevel@tonic-gate #define SUP_CACHE 0x00010000 /* set cache size */ 76*0Sstevel@tonic-gate #define SUP_PREFETCH 0x00020000 /* set prefetch threshold */ 77*0Sstevel@tonic-gate #define SUP_CACHE_MIN 0x00040000 /* set min. prefetch */ 78*0Sstevel@tonic-gate #define SUP_CACHE_MAX 0x00080000 /* set max. prefetch */ 79*0Sstevel@tonic-gate #define SUP_PSECT 0x00100000 /* set physical sectors */ 80*0Sstevel@tonic-gate #define SUP_PHEAD 0x00200000 /* set physical heads */ 81*0Sstevel@tonic-gate #define SUP_FMTTIME 0x00400000 /* set format time */ 82*0Sstevel@tonic-gate #define SUP_CYLSKEW 0x00800000 /* set cylinder skew */ 83*0Sstevel@tonic-gate #define SUP_TRKSKEW 0x01000000 /* set track skew */ 84*0Sstevel@tonic-gate 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gate /* 87*0Sstevel@tonic-gate * The define the minimum set of parameters necessary to declare a disk 88*0Sstevel@tonic-gate * and a partition map in the data file. Depending on the ctlr type, 89*0Sstevel@tonic-gate * more info than this may be necessary for declaring disks. 90*0Sstevel@tonic-gate */ 91*0Sstevel@tonic-gate #define SUP_MIN_DRIVE (SUP_CTLR | SUP_RPM | SUP_PCYL | \ 92*0Sstevel@tonic-gate SUP_NCYL | SUP_ACYL | SUP_NHEAD | SUP_NSECT) 93*0Sstevel@tonic-gate 94*0Sstevel@tonic-gate #define SUP_MIN_PART 0x0003 /* for maps */ 95*0Sstevel@tonic-gate 96*0Sstevel@tonic-gate 97*0Sstevel@tonic-gate /* 98*0Sstevel@tonic-gate * Prototypes for ANSI C compilers 99*0Sstevel@tonic-gate */ 100*0Sstevel@tonic-gate int do_options(int argc, char *argv[]); 101*0Sstevel@tonic-gate void sup_init(void); 102*0Sstevel@tonic-gate int open_disk(char *diskname, int flags); 103*0Sstevel@tonic-gate void do_search(char *arglist[]); 104*0Sstevel@tonic-gate int dtype_match(struct dk_label *label, struct disk_type *dtype); 105*0Sstevel@tonic-gate int parts_match(struct dk_label *label, struct partition_info *pinfo); 106*0Sstevel@tonic-gate int diskname_match(char *name, struct disk_info *disk); 107*0Sstevel@tonic-gate 108*0Sstevel@tonic-gate 109*0Sstevel@tonic-gate 110*0Sstevel@tonic-gate #ifdef __cplusplus 111*0Sstevel@tonic-gate } 112*0Sstevel@tonic-gate #endif 113*0Sstevel@tonic-gate 114*0Sstevel@tonic-gate #endif /* _STARTUP_H */ 115