]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - smartctl.h
Merge branch 'upstream'
[mirror_smartmontools-debian.git] / smartctl.h
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.24 2006/07/20 20:59:45 chrfranke 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 // device is in low power mode and -n option requests to exit
43 #define FAILPOWER (0x01<<1)
44
45 // read device identity (ATA only) failed
46 #define FAILID (0x01<<1)
47
48 // smart command failed, or ATA identify device structure missing information
49 #define FAILSMART (0x01<<2)
50
51 // SMART STATUS returned FAILURE
52 #define FAILSTATUS (0x01<<3)
53
54 // Attributes found <= threshold with prefail=1
55 #define FAILATTR (0x01<<4)
56
57 // SMART STATUS returned GOOD but age attributes failed or prefail
58 // attributes have failed in the past
59 #define FAILAGE (0x01<<5)
60
61 // Device had Errors in the error log
62 #define FAILERR (0x01<<6)
63
64 // Device had Errors in the self-test log
65 #define FAILLOG (0x01<<7)
66
67 // Classes of SMART commands. Here 'mandatory' means "Required by the
68 // ATA/ATAPI-5 Specification if the device implements the S.M.A.R.T.
69 // command set." The 'mandatory' S.M.A.R.T. commands are: (1)
70 // Enable/Disable Attribute Autosave, (2) Enable/Disable S.M.A.R.T.,
71 // and (3) S.M.A.R.T. Return Status. All others are optional.
72 #define OPTIONAL_CMD 1
73 #define MANDATORY_CMD 2
74
75 void print_smartctl_examples();
76
77 #endif