Skip to content
Snippets Groups Projects
Commit a08d6017 authored by ballen4705's avatar ballen4705
Browse files

release 21

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@161 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent faf82dc1
Branches
No related tags found
No related merge requests found
CHANGELOG for smartmontools CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.28 2002/10/29 15:19:30 ballen4705 Exp $ $Id: CHANGELOG,v 1.29 2002/10/29 17:50:58 ballen4705 Exp $
Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
...@@ -26,6 +26,16 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -26,6 +26,16 @@ NOTES FOR FUTURE RELEASES: see TODO file.
CURRENT RELEASE (see VERSION file in this directory): CURRENT RELEASE (see VERSION file in this directory):
smartmontools-5.0.VERSION
Eliminated some global variables out of header files and other
minor cleanup of smartd.
smartmontools-5.0.20
Did some revision of the man page for smartd and made the usage
messages for Directives 100% consistent.
smartmontools-5.0-19 smartmontools-5.0-19
smartd: prints warning message when it gets SIGHUP, saying that it smartd: prints warning message when it gets SIGHUP, saying that it
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Home page: http://smartmontools.sourceforge.net # Home page: http://smartmontools.sourceforge.net
# #
# $Id: Makefile,v 1.27 2002/10/29 16:59:02 ballen4705 Exp $ # $Id: Makefile,v 1.28 2002/10/29 17:50:58 ballen4705 Exp $
# #
# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
# #
...@@ -94,7 +94,7 @@ uninstall: Makefile ...@@ -94,7 +94,7 @@ uninstall: Makefile
# All this mess is to automatically increment the release numbers. # All this mess is to automatically increment the release numbers.
# The number of the next release is kept in the file "VERSION" # The number of the next release is kept in the file "VERSION"
release: $(releasefiles) release: $(releasefiles) clean
rm -rf $(pkgname) rm -rf $(pkgname)
mkdir $(pkgname) mkdir $(pkgname)
cp -a $(releasefiles) $(pkgname) cp -a $(releasefiles) $(pkgname)
......
20 21
...@@ -41,14 +41,28 @@ ...@@ -41,14 +41,28 @@
#include "ataprint.h" #include "ataprint.h"
#include "extern.h" #include "extern.h"
// CVS ID strings // CVS ID strings
extern const char *CVSid1, *CVSid2; extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.c,v 1.43 2002/10/29 16:59:02 ballen4705 Exp $" const char *CVSid6="$Id: smartd.c,v 1.44 2002/10/29 17:50:58 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc. // global variable used for control of printing, passing arguments, etc.
atamainctrl *con=NULL; atamainctrl *con=NULL;
// Two other globals -- number of ATA and SCSI devices being monitored
int numatadevices;
int numscsidevices;
// How long to sleep between checks. Handy as global variable for
// debugging
int checktime=CHECKTIME;
// Global Variables for command line options. These should go into a
// structure at some point.
unsigned char debugmode = FALSE;
unsigned char printcopyleft = FALSE;
// This function prints either to stdout or to the syslog as needed // This function prints either to stdout or to the syslog as needed
void printout(int priority,char *fmt, ...){ void printout(int priority,char *fmt, ...){
va_list ap; va_list ap;
...@@ -63,8 +77,7 @@ void printout(int priority,char *fmt, ...){ ...@@ -63,8 +77,7 @@ void printout(int priority,char *fmt, ...){
return; return;
} }
// Printing function for debugging atacmds. // Printing function for watching ataprint commands, or losing them
// in #if statement
void pout(char *fmt, ...){ void pout(char *fmt, ...){
va_list ap; va_list ap;
// initialize variable argument list // initialize variable argument list
...@@ -112,7 +125,6 @@ int daemon_init(void){ ...@@ -112,7 +125,6 @@ int daemon_init(void){
// from here on, we are the child process. // from here on, we are the child process.
setsid(); setsid();
// Fork one more time to avoid any possibility of having terminals // Fork one more time to avoid any possibility of having terminals
if ((pid=fork()) < 0) { if ((pid=fork()) < 0) {
// unable to fork! // unable to fork!
...@@ -137,7 +149,7 @@ int daemon_init(void){ ...@@ -137,7 +149,7 @@ int daemon_init(void){
dup(i); dup(i);
umask(0); umask(0);
chdir("/"); chdir("/");
return(0); return 0;
} }
// Prints header identifying version of code and home // Prints header identifying version of code and home
...@@ -947,10 +959,8 @@ int parseconfigfile(){ ...@@ -947,10 +959,8 @@ int parseconfigfile(){
exit(1); exit(1);
} }
// const char opts[] = {DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'h','?','\0' };
const char opts[] = {DEBUGMODE, PRINTCOPYLEFT,'h','?','\0' }; const char opts[] = {DEBUGMODE, PRINTCOPYLEFT,'h','?','\0' };
// Parses input line, prints usage message and // Parses input line, prints usage message and
// version/license/copyright messages // version/license/copyright messages
void ParseOpts(int argc, char **argv){ void ParseOpts(int argc, char **argv){
...@@ -969,9 +979,6 @@ void ParseOpts(int argc, char **argv){ ...@@ -969,9 +979,6 @@ void ParseOpts(int argc, char **argv){
case DEBUGMODE : case DEBUGMODE :
debugmode = TRUE; debugmode = TRUE;
break; break;
case EMAILNOTIFICATION:
emailnotification = TRUE;
break;
case '?': case '?':
case 'h': case 'h':
default: default:
......
...@@ -41,14 +41,28 @@ ...@@ -41,14 +41,28 @@
#include "ataprint.h" #include "ataprint.h"
#include "extern.h" #include "extern.h"
// CVS ID strings // CVS ID strings
extern const char *CVSid1, *CVSid2; extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.cpp,v 1.43 2002/10/29 16:59:02 ballen4705 Exp $" const char *CVSid6="$Id: smartd.cpp,v 1.44 2002/10/29 17:50:58 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc. // global variable used for control of printing, passing arguments, etc.
atamainctrl *con=NULL; atamainctrl *con=NULL;
// Two other globals -- number of ATA and SCSI devices being monitored
int numatadevices;
int numscsidevices;
// How long to sleep between checks. Handy as global variable for
// debugging
int checktime=CHECKTIME;
// Global Variables for command line options. These should go into a
// structure at some point.
unsigned char debugmode = FALSE;
unsigned char printcopyleft = FALSE;
// This function prints either to stdout or to the syslog as needed // This function prints either to stdout or to the syslog as needed
void printout(int priority,char *fmt, ...){ void printout(int priority,char *fmt, ...){
va_list ap; va_list ap;
...@@ -63,8 +77,7 @@ void printout(int priority,char *fmt, ...){ ...@@ -63,8 +77,7 @@ void printout(int priority,char *fmt, ...){
return; return;
} }
// Printing function for debugging atacmds. // Printing function for watching ataprint commands, or losing them
// in #if statement
void pout(char *fmt, ...){ void pout(char *fmt, ...){
va_list ap; va_list ap;
// initialize variable argument list // initialize variable argument list
...@@ -112,7 +125,6 @@ int daemon_init(void){ ...@@ -112,7 +125,6 @@ int daemon_init(void){
// from here on, we are the child process. // from here on, we are the child process.
setsid(); setsid();
// Fork one more time to avoid any possibility of having terminals // Fork one more time to avoid any possibility of having terminals
if ((pid=fork()) < 0) { if ((pid=fork()) < 0) {
// unable to fork! // unable to fork!
...@@ -137,7 +149,7 @@ int daemon_init(void){ ...@@ -137,7 +149,7 @@ int daemon_init(void){
dup(i); dup(i);
umask(0); umask(0);
chdir("/"); chdir("/");
return(0); return 0;
} }
// Prints header identifying version of code and home // Prints header identifying version of code and home
...@@ -947,10 +959,8 @@ int parseconfigfile(){ ...@@ -947,10 +959,8 @@ int parseconfigfile(){
exit(1); exit(1);
} }
// const char opts[] = {DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'h','?','\0' };
const char opts[] = {DEBUGMODE, PRINTCOPYLEFT,'h','?','\0' }; const char opts[] = {DEBUGMODE, PRINTCOPYLEFT,'h','?','\0' };
// Parses input line, prints usage message and // Parses input line, prints usage message and
// version/license/copyright messages // version/license/copyright messages
void ParseOpts(int argc, char **argv){ void ParseOpts(int argc, char **argv){
...@@ -969,9 +979,6 @@ void ParseOpts(int argc, char **argv){ ...@@ -969,9 +979,6 @@ void ParseOpts(int argc, char **argv){
case DEBUGMODE : case DEBUGMODE :
debugmode = TRUE; debugmode = TRUE;
break; break;
case EMAILNOTIFICATION:
emailnotification = TRUE;
break;
case '?': case '?':
case 'h': case 'h':
default: default:
......
...@@ -23,42 +23,40 @@ ...@@ -23,42 +23,40 @@
*/ */
#ifndef CVSID7 #ifndef CVSID7
#define CVSID7 "$Id: smartd.h,v 1.13 2002/10/29 16:59:02 ballen4705 Exp $\n" #define CVSID7 "$Id: smartd.h,v 1.14 2002/10/29 17:50:59 ballen4705 Exp $\n"
#endif #endif
// Configuration file // Configuration file
#define CONFIGFILE "/etc/smartd.conf" #define CONFIGFILE "/etc/smartd.conf"
// maximum line length in configuration file
#define MAXLINELEN 128 #define MAXLINELEN 128
// maximum number of device entries in configuration file.
#define MAXENTRIES 64 #define MAXENTRIES 64
#define MAXCONTLINE 511
#define MAXDEVLEN 51
/* how often SMART status is checked, in seconds */ // maximum length of a continued line in configuration file
int checktime = 1800; #define MAXCONTLINE 511
// number of ATA and SCSI devices being watched // how often SMART status is checked, in seconds
int numatadevices; #define CHECKTIME 1800
int numscsidevices;
// maximum number of ATA devices to monitor
#define MAXATADEVICES 12 #define MAXATADEVICES 12
// maximum number of SCSI devices to monitor
#define MAXSCSIDEVICES 26 #define MAXSCSIDEVICES 26
/* Defines for command line options */ /* Defines for command line options */
#define DEBUGMODE 'X' #define DEBUGMODE 'X'
#define EMAILNOTIFICATION 'e'
#define PRINTCOPYLEFT 'V' #define PRINTCOPYLEFT 'V'
/* Boolean Values */ /* Boolean Values */
#define TRUE 0x01 #define TRUE 0x01
#define FALSE 0x00 #define FALSE 0x00
/* Global Variables for command line options */ // used to store a list of SCSI devices to monitor. Devicename points
// These should go into a structure at some point // to a malloced name string.
unsigned char debugmode = FALSE;
unsigned char emailnotification = FALSE;
unsigned char printcopyleft = FALSE;
typedef struct scsidevices_s { typedef struct scsidevices_s {
unsigned char SmartPageSupported; unsigned char SmartPageSupported;
unsigned char TempPageSupported; unsigned char TempPageSupported;
...@@ -67,13 +65,14 @@ typedef struct scsidevices_s { ...@@ -67,13 +65,14 @@ typedef struct scsidevices_s {
} scsidevices_t; } scsidevices_t;
// Used to store a list of devices and options that were in the
// configuration file.
typedef struct configfile_s { typedef struct configfile_s {
// which line was entry in file; what device type and name? // which line was entry in file; what device type and name?
int lineno; int lineno;
char tryata; char tryata;
char tryscsi; char tryscsi;
char *name; char *name;
// which tests have been enabled? // which tests have been enabled?
char smartcheck; char smartcheck;
char usagefailed; char usagefailed;
...@@ -81,13 +80,12 @@ typedef struct configfile_s { ...@@ -81,13 +80,12 @@ typedef struct configfile_s {
char usage; char usage;
char selftest; char selftest;
char errorlog; char errorlog;
// counts of ata and self-test errors. Perhaps ought to be in the
// store counts of ata and self-test errors // atadevices_t structure.
char selflogcount; char selflogcount;
int ataerrorcount; int ataerrorcount;
// following two items point to 32 bytes, in the form of are // following two items point to 32 bytes, in the form of
// 32x8=256 single bit flags // 32x8=256 single bit flags
// valid attribute numbers are from 1 <= x <= 255 // valid attribute numbers are from 1 <= x <= 255
// valid attribute values are from 1 <= x <= 254 // valid attribute values are from 1 <= x <= 254
unsigned char *failatt; unsigned char *failatt;
...@@ -95,6 +93,7 @@ typedef struct configfile_s { ...@@ -95,6 +93,7 @@ typedef struct configfile_s {
} cfgfile; } cfgfile;
// Used to store list of ATA devices to monitor.
typedef struct atadevices_s { typedef struct atadevices_s {
struct ata_smart_values *smartval; struct ata_smart_values *smartval;
struct ata_smart_thresholds *smartthres; struct ata_smart_thresholds *smartthres;
......
Release: 20 Release: 21
Summary: SMARTmontools - for monitoring S.M.A.R.T. disks and devices Summary: SMARTmontools - for monitoring S.M.A.R.T. disks and devices
Name: smartmontools Name: smartmontools
Version: 5.0 Version: 5.0
...@@ -18,7 +18,7 @@ Packager: Bruce Allen <smartmontools-support@lists.sourceforge.net> ...@@ -18,7 +18,7 @@ Packager: Bruce Allen <smartmontools-support@lists.sourceforge.net>
# http://telia.dl.sourceforge.net/sourceforge/smartmontools/smartmontools-%{version}-%{release}.tar.gz # http://telia.dl.sourceforge.net/sourceforge/smartmontools/smartmontools-%{version}-%{release}.tar.gz
# CVS ID of this file is: # CVS ID of this file is:
# $Id: smartmontools.spec,v 1.31 2002/10/29 16:59:02 ballen4705 Exp $ # $Id: smartmontools.spec,v 1.32 2002/10/29 17:50:59 ballen4705 Exp $
# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
# Home page: http://smartmontools.sourceforge.net # Home page: http://smartmontools.sourceforge.net
...@@ -113,6 +113,10 @@ fi ...@@ -113,6 +113,10 @@ fi
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog %changelog
* Tue Oct 29 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> * Tue Oct 29 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
- Eliminated some global variables out of header files and other
minor cleanup of smartd.
- Did some revision of the man page for smartd and made the usage
messages for Directives consistent.
- smartd: prints warning message when it gets SIGHUP, saying that it is - smartd: prints warning message when it gets SIGHUP, saying that it is
NOT re-reading the config file. NOT re-reading the config file.
- smartctl: updated man page to say self-test commands -O,x,X,s,S,A - smartctl: updated man page to say self-test commands -O,x,X,s,S,A
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment