4 * Home page of code is: http://smartmontools.sourceforge.net
6 * Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net>
7 * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * You should have received a copy of the GNU General Public License
15 * (for example COPYING); if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 * This code was originally developed as a Senior Thesis by Michael Cornwell
19 * at the Concurrent Systems Laboratory (now part of the Storage Systems
20 * Research Center), Jack Baskin School of Engineering, University of
21 * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
28 #define EXTERN_H_CVSID "$Id: extern.h,v 1.47 2006/09/15 08:03:52 sxzzsf Exp $\n"
30 // Possible values for fixfirmwarebug. If use has NOT specified -F at
31 // all, then value is 0.
32 #define FIX_NOTSPECIFIED 0
35 #define FIX_SAMSUNG2 3
37 // Block used for global control/communications. If you need more
38 // global variables, this should be the only place that you need to
40 typedef struct smartmonctrl_s
{
41 // spans for selective self-test
42 uint64_t smartselectivespan
[5][2];
44 int smartselectivenumspans
;
46 // one plus time in minutes to wait after powerup before restarting
47 // interrupted offline scan after selective self-test.
49 // run offline scan after selective self-test. 0: don't change, 1:
50 // turn off scan after selective self-test, 2: turn on scan after
51 // selective self-test.
52 unsigned char scanafterselect
;
53 // skip check, if disk in idle or standby mode
54 unsigned char powermode
;
55 unsigned char driveinfo
;
56 unsigned char checksmart
;
57 unsigned char smartvendorattrib
;
58 unsigned char generalsmartvalues
;
59 unsigned char smartlogdirectory
;
60 unsigned char smartselftestlog
;
61 unsigned char selectivetestlog
;
62 unsigned char smarterrorlog
;
63 unsigned char smartbackgroundlog
;
64 unsigned char smartdisable
;
65 unsigned char smartenable
;
66 unsigned char smartstatus
;
67 unsigned char smartexeoffimmediate
;
68 unsigned char smartshortselftest
;
69 unsigned char smartextendselftest
;
70 unsigned char smartconveyanceselftest
;
71 unsigned char smartselectiveselftest
;
72 unsigned char smartshortcapselftest
;
73 unsigned char smartextendcapselftest
;
74 unsigned char smartconveyancecapselftest
;
75 unsigned char smartselectivecapselftest
;
76 unsigned char smartselftestabort
;
77 unsigned char smartautoofflineenable
;
78 unsigned char smartautoofflinedisable
;
79 unsigned char smartautosaveenable
;
80 unsigned char smartautosavedisable
;
81 unsigned char printing_switchable
;
82 unsigned char dont_print
;
83 unsigned char permissive
;
84 unsigned char conservative
;
85 unsigned char checksumfail
;
86 unsigned char checksumignore
;
87 unsigned char reportataioctl
;
88 unsigned char reportscsiioctl
;
89 unsigned char fixfirmwarebug
;
90 unsigned char satpassthrulen
;
91 // Controller type (device type) has been specified explicitly
92 unsigned char controller_explicit
;
93 // 3Ware controller type, but also extensible to other contoller types
94 unsigned char controller_type
;
95 // For 3Ware controllers, nonzero value is 1 plus the disk number
96 unsigned char controller_port
;
97 // combined controller/channle/pmport for highpoint rocketraid controller
98 unsigned char hpt_data
[3];
99 unsigned char ignorepresets
;
100 unsigned char showpresets
;
101 // The i'th entry in this array will modify the printed meaning of
102 // the i'th SMART attribute. The default definitions of the
103 // Attributes are obtained by having the array be all zeros. If
104 // attributedefs[i] is nonzero, it means that the i'th attribute has
105 // a non-default meaning. See the ataPrintSmartAttribName and
106 // and parse_attribute_def functions.
107 unsigned char attributedefs
[256];