dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / format / analyze.h
blob54e84891b64ac8f3abee85f2d339f4abaaa7d615
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _ANALYZE_H
27 #define _ANALYZE_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
34 * This file contains definitions related to surface analysis.
38 * These are variables referenced by the analysis routines. They
39 * are declared in analyze.c.
41 extern int scan_entire;
42 extern diskaddr_t scan_lower, scan_upper;
43 extern int scan_correct, scan_stop, scan_loop, scan_passes;
44 extern int scan_random, scan_auto;
45 extern uint_t scan_size;
46 extern int scan_restore_defects, scan_restore_label;
49 * These variables hold summary info for the end of analysis.
50 * They are declared in analyze.c.
52 extern offset_t scan_cur_block;
53 extern int64_t scan_blocks_fixed;
56 * This variable is used to tell whether the most recent surface
57 * analysis error was caused by a media defect or some other problem.
58 * It is declared in analyze.c.
60 extern int media_error;
61 extern int disk_error;
64 * These defines are flags for the surface analysis types.
66 #define SCAN_VALID 0x01 /* read data off disk */
67 #define SCAN_PATTERN 0x02 /* write and read pattern */
68 #define SCAN_COMPARE 0x04 /* manually check pattern */
69 #define SCAN_WRITE 0x08 /* write data to disk */
70 #define SCAN_PURGE 0x10 /* purge data on disk */
71 #define SCAN_PURGE_READ_PASS 0x20 /* read/compare pass */
72 #define SCAN_PURGE_ALPHA_PASS 0x40 /* alpha pattern pass */
73 #define SCAN_VERIFY 0x80 /* verify data on disk */
74 #define SCAN_VERIFY_READ_PASS 0x100 /* read/compare pass */
78 * Miscellaneous defines.
80 #define BUF_SECTS 126 /* size of the buffers */
82 * Number of passes for purge command. It is kept here to allow
83 * it to be used in menu_analyze.c also
84 * This feature is added at the request of Sun Fed.
86 #define NPPATTERNS 4 /* number of purge patterns */
87 #define READPATTERN (NPPATTERNS - 1)
91 * defines for disk errors during surface analysis.
93 #define DISK_STAT_RESERVED 0x01 /* disk is reserved */
94 #define DISK_STAT_NOTREADY 0x02 /* disk not ready */
95 #define DISK_STAT_UNAVAILABLE 0x03 /* disk is being formatted */
96 #define DISK_STAT_DATA_PROTECT 0x04 /* disk is write protected */
99 * Prototypes for ANSI C compilers
101 int do_scan(int flags, int mode);
103 #ifdef __cplusplus
105 #endif
107 #endif /* _ANALYZE_H */