]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - extern.h
check if daemon is running befor starting it
[mirror_smartmontools-debian.git] / extern.h
1 /*
2 * extern.h
3 *
4 * Home page of code is: http://smartmontools.sourceforge.net
5 *
6 * Copyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net>
7 * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
8 *
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)
12 * any later version.
13 *
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.
17 *
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/
22 *
23 */
24
25 #ifndef EXTERN_H_
26 #define EXTERN_H_
27
28 #define EXTERN_H_CVSID "$Id: extern.h,v 1.54 2008/03/04 22:09:47 ballen4705 Exp $\n"
29
30 // Possible values for fixfirmwarebug. If user has NOT specified -F at
31 // all, then value is 0.
32 #define FIX_NOTSPECIFIED 0
33 #define FIX_NONE 1
34 #define FIX_SAMSUNG 2
35 #define FIX_SAMSUNG2 3
36 #define FIX_SAMSUNG3 4
37
38 // Block used for global control/communications. If you need more
39 // global variables, this should be the only place that you need to
40 // add them.
41 typedef struct smartmonctrl_s {
42 // spans for selective self-test
43 uint64_t smartselectivespan[5][2];
44 // mode for each span, see SEL_* in utility.h
45 char smartselectivemode[5];
46 // number of spans
47 int smartselectivenumspans;
48 int testcase;
49 unsigned scttempint;
50 // one plus time in minutes to wait after powerup before restarting
51 // interrupted offline scan after selective self-test.
52 int pendingtime;
53 // run offline scan after selective self-test. 0: don't change, 1:
54 // turn off scan after selective self-test, 2: turn on scan after
55 // selective self-test.
56 unsigned char scanafterselect;
57 // skip check, if disk in idle or standby mode
58 unsigned char powermode;
59 unsigned char driveinfo;
60 unsigned char checksmart;
61 unsigned char smartvendorattrib;
62 unsigned char generalsmartvalues;
63 unsigned char smartlogdirectory;
64 unsigned char smartselftestlog;
65 unsigned char selectivetestlog;
66 unsigned char smarterrorlog;
67 unsigned char smartbackgroundlog;
68 unsigned char scttempsts;
69 unsigned char scttemphist;
70 unsigned char scttempintp;
71 unsigned char smartdisable;
72 unsigned char smartenable;
73 unsigned char smartstatus;
74 unsigned char smartexeoffimmediate;
75 unsigned char smartshortselftest;
76 unsigned char smartextendselftest;
77 unsigned char smartconveyanceselftest;
78 unsigned char smartselectiveselftest;
79 unsigned char smartshortcapselftest;
80 unsigned char smartextendcapselftest;
81 unsigned char smartconveyancecapselftest;
82 unsigned char smartselectivecapselftest;
83 unsigned char smartselftestabort;
84 unsigned char smartautoofflineenable;
85 unsigned char smartautoofflinedisable;
86 unsigned char smartautosaveenable;
87 unsigned char smartautosavedisable;
88 unsigned char printing_switchable;
89 unsigned char dont_print;
90 unsigned char dont_print_serial;
91 unsigned char permissive;
92 unsigned char conservative;
93 unsigned char checksumfail;
94 unsigned char checksumignore;
95 unsigned char reportataioctl;
96 unsigned char reportscsiioctl;
97 unsigned char fixfirmwarebug;
98 unsigned char fixswappedid;
99 unsigned char satpassthrulen;
100 // Controller type (device type) has been specified explicitly
101 unsigned char controller_explicit;
102 // 3Ware controller type, but also extensible to other contoller types
103 unsigned char controller_type;
104 // For 3Ware controllers, nonzero value is 1 plus the disk number
105 unsigned char controller_port;
106 // combined controller/channle/pmport for highpoint rocketraid controller
107 unsigned char hpt_data[3];
108 unsigned char ignorepresets;
109 unsigned char showpresets;
110 // The i'th entry in this array will modify the printed meaning of
111 // the i'th SMART attribute. The default definitions of the
112 // Attributes are obtained by having the array be all zeros. If
113 // attributedefs[i] is nonzero, it means that the i'th attribute has
114 // a non-default meaning. See the ataPrintSmartAttribName and
115 // and parse_attribute_def functions.
116 unsigned char attributedefs[256];
117 } smartmonctrl;
118
119 #endif