]>
Commit | Line | Data |
---|---|---|
832b75ed GG |
1 | /* |
2 | * smartctl.h | |
3 | * | |
4 | * Home page of code is: http://smartmontools.sourceforge.net | |
5 | * | |
6 | * Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net> | |
7 | * Copyright (C) 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 SMARTCTL_H_ | |
26 | #define SMARTCTL_H_ | |
27 | ||
28 | #define SMARTCTL_H_CVSID "$Id: smartctl.h,v 1.23 2006/04/12 14:54:28 ballen4705 Exp $\n" | |
29 | ||
30 | /* Boolean Values */ | |
31 | #define TRUE 0x01 | |
32 | #define FALSE 0x00 | |
33 | ||
34 | // Return codes (bitmask) | |
35 | ||
36 | // command line did not parse, or internal error occured in smartctl | |
37 | #define FAILCMD (0x01<<0) | |
38 | ||
39 | // device open failed | |
40 | #define FAILDEV (0x01<<1) | |
41 | ||
42 | // read device identity (ATA only) failed | |
43 | #define FAILID (0x01<<1) | |
44 | ||
45 | // smart command failed, or ATA identify device structure missing information | |
46 | #define FAILSMART (0x01<<2) | |
47 | ||
48 | // SMART STATUS returned FAILURE | |
49 | #define FAILSTATUS (0x01<<3) | |
50 | ||
51 | // Attributes found <= threshold with prefail=1 | |
52 | #define FAILATTR (0x01<<4) | |
53 | ||
54 | // SMART STATUS returned GOOD but age attributes failed or prefail | |
55 | // attributes have failed in the past | |
56 | #define FAILAGE (0x01<<5) | |
57 | ||
58 | // Device had Errors in the error log | |
59 | #define FAILERR (0x01<<6) | |
60 | ||
61 | // Device had Errors in the self-test log | |
62 | #define FAILLOG (0x01<<7) | |
63 | ||
64 | // Classes of SMART commands. Here 'mandatory' means "Required by the | |
65 | // ATA/ATAPI-5 Specification if the device implements the S.M.A.R.T. | |
66 | // command set." The 'mandatory' S.M.A.R.T. commands are: (1) | |
67 | // Enable/Disable Attribute Autosave, (2) Enable/Disable S.M.A.R.T., | |
68 | // and (3) S.M.A.R.T. Return Status. All others are optional. | |
69 | #define OPTIONAL_CMD 1 | |
70 | #define MANDATORY_CMD 2 | |
71 | ||
72 | void print_smartctl_examples(); | |
73 | ||
74 | #endif |