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