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