Skip to content
Snippets Groups Projects
Select Git revision
  • 36dee614f1b7c162acb98eb32497bfd8b8890731
  • 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

smartd.h

Blame
  • smartd.h 2.33 KiB
    /*
     * smartd.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 CVSID7
    #define CVSID7 "$Id: smartd.h,v 1.10 2002/10/26 09:38:26 ballen4705 Exp $\n"
    #endif
    
    // Configuration file
    #define CONFIGFILE "/etc/smartd.conf"
    #define MAXLINELEN 114
    #define MAXENTRIES 64
    
    // BAD PROGRAMMING PRACTICE - GLOBAL VARIABLES SHOULD BE IN .c NOT .h
    // FILE
    /* how often SMART status is checked, in seconds */
    int checktime = 1800;
    // number of ATA and SCSI devices being watched
    int numatadevices;
    int numscsidevices;
    #define MAXATADEVICES	12
    #define MAXSCSIDEVICES	26
    
    /* Defines for command line options */ 
    #define DEBUGMODE 		'X'
    #define EMAILNOTIFICATION	'e'
    #define PRINTCOPYLEFT           'V'
    
    /* Boolean Values */
    #define TRUE 0x01
    #define FALSE 0x00
    
    /* Global Variables for command line options */
    // These should go into a structure at some point
    unsigned char debugmode               = FALSE;
    unsigned char emailnotification       = FALSE;
    unsigned char printcopyleft           = FALSE;
    
    typedef struct atadevices_s {
    	int selftest;
    	struct hd_driveid drive;
    	struct ata_smart_values smartval;
    	struct ata_smart_thresholds smartthres;
    	char devicename[MAXLINELEN+2];
    }  atadevices_t;
    
    typedef struct scsidevices_s {
    	unsigned char SmartPageSupported;
    	unsigned char TempPageSupported;
    	unsigned char Temperature;
    	char devicename[MAXLINELEN+2];
    } scsidevices_t;
    
    typedef struct configfile_s {
      int lineno;
      int tryata;
      int tryscsi;
      char name[MAXLINELEN+2];  // really only needs to be +1
    } cfgfile;