]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - smartctl.h
Refreshed patches
[mirror_smartmontools-debian.git] / smartctl.h
CommitLineData
832b75ed
GG
1/*
2 * smartctl.h
3 *
4 * Home page of code is: http://smartmontools.sourceforge.net
5 *
2127e193 6 * Copyright (C) 2002-9 Bruce Allen <smartmontools-support@lists.sourceforge.net>
832b75ed
GG
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
2127e193 28#define SMARTCTL_H_CVSID "$Id: smartctl.h,v 1.27 2009/06/20 19:11:04 chrfranke Exp $\n"
832b75ed
GG
29
30// Return codes (bitmask)
31
32// command line did not parse, or internal error occured in smartctl
33#define FAILCMD (0x01<<0)
34
35// device open failed
36#define FAILDEV (0x01<<1)
37
4d59bff9
GG
38// device is in low power mode and -n option requests to exit
39#define FAILPOWER (0x01<<1)
40
832b75ed
GG
41// read device identity (ATA only) failed
42#define FAILID (0x01<<1)
43
44// smart command failed, or ATA identify device structure missing information
45#define FAILSMART (0x01<<2)
46
47// SMART STATUS returned FAILURE
48#define FAILSTATUS (0x01<<3)
49
50// Attributes found <= threshold with prefail=1
51#define FAILATTR (0x01<<4)
52
53// SMART STATUS returned GOOD but age attributes failed or prefail
54// attributes have failed in the past
55#define FAILAGE (0x01<<5)
56
57// Device had Errors in the error log
58#define FAILERR (0x01<<6)
59
60// Device had Errors in the self-test log
61#define FAILLOG (0x01<<7)
62
63// Classes of SMART commands. Here 'mandatory' means "Required by the
64// ATA/ATAPI-5 Specification if the device implements the S.M.A.R.T.
65// command set." The 'mandatory' S.M.A.R.T. commands are: (1)
66// Enable/Disable Attribute Autosave, (2) Enable/Disable S.M.A.R.T.,
67// and (3) S.M.A.R.T. Return Status. All others are optional.
68#define OPTIONAL_CMD 1
69#define MANDATORY_CMD 2
70
2127e193
GI
71// Moved to C++ interface
72//void print_smartctl_examples();
832b75ed
GG
73
74#endif