Skip to content
Snippets Groups Projects
Select Git revision
  • 26a7af76efd50783ac1d1a9016d3b3e65aff2868
  • master default
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
22 results

smartctl.h

Blame
  • user avatar
    ballen4705 authored
        for the values.  I may add some additional values as time goes on,
        so this is prelimiary.
    
        The SMART status check now uses the correct ATA call.  If failure
        is detected we search through attributes to list the failed ones.
        If the SMART status check shows GOOD, we then look to see if their
        are any usage attributes or prefail attributes have failed at any
        time.  If so we print them.
    
        Modified function that prints vendor attributes to say if the
        attribute has currently failed or has ever failed.
    
    
    git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@86 4ea69e1a-61f1-4043-bf83-b5c94c648137
    26a7af76
    History
    smartctl.h 2.31 KiB
    /*
     * smartctl.h
     *
     * Home page of code is: http://smartmontools.sourceforge.net
     *
     * Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
     * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2, or (at your option)
     * any later version.
     *
     * You should have received a copy of the GNU General Public License
     * (for example COPYING); if not, write to the Free
     * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     *
     * This code was originally developed as a Senior Thesis by Michael Cornwell
     * at the Concurrent Systems Laboratory (now part of the Storage Systems
     * Research Center), Jack Baskin School of Engineering, University of
     * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
     *
     */
    
    #ifndef __SMARTCTL_H_
    #define __SMARTCTL_H_
    
    #ifndef CVSID6
    #define CVSID6 "$Id: smartctl.h,v 1.8 2002/10/22 16:49:16 ballen4705 Exp $\n"
    #endif
    
    /* Defines for command line options */ 
    #define DRIVEINFO		'i'
    #define CHECKSMART		'c'
    #define SMARTVERBOSEALL		'a'
    #define SMARTVENDORATTRIB	'v'
    #define GENERALSMARTVALUES	'g'
    #define SMARTERRORLOG		'l'
    #define SMARTSELFTESTLOG	'L'
    #define SMARTDISABLE		'd'
    #define SMARTENABLE		'e'
    #define SMARTEXEOFFIMMEDIATE	'O'
    #define SMARTSHORTSELFTEST	'S'
    #define SMARTEXTENDSELFTEST	'X'
    #define SMARTSHORTCAPSELFTEST	's'
    #define SMARTEXTENDCAPSELFTEST	'x'
    #define SMARTSELFTESTABORT	'A'
    #define SMARTAUTOOFFLINEENABLE  't'
    #define SMARTAUTOOFFLINEDISABLE 'T'
    #define SMARTAUTOSAVEENABLE     'f'
    #define SMARTAUTOSAVEDISABLE    'F'
    #define PRINTCOPYLEFT           'p'
    #define SMART009MINUTES         'm'
    
    
    /* Boolean Values */
    #define TRUE 0x01
    #define FALSE 0x00
    
    // Return codes (bitmask)
    
    // command line did not parse
    #define FAILCMD   (0x01<<0)
    
    // device open failed
    #define FAILDEV   (0x01<<1)
            
    // smart command failed
    #define FAILSMART (0x01<<2)
    
    // SMART STATUS returned FAILURE
    #define FAILSTATUS (0x01<<3)
    
    // Attributes found <= threshold with prefail=1
    #define FAILATTR (0x01<<4)
    
    // SMART STATUS returned GOOD but age attributes failed or prefail
    // attributes have failed in the past
    #define FAILAGE (0x01<<5)
    
    // Device ID failed
    #define FAILID (0x01<<6)
    
    #endif