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

Fixed logic inversion in testunitready (now testunitnotready)

Added check to smartctl for consistency


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@291 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent cf88c714
Branches
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.49 2002/11/16 18:30:23 ballen4705 Exp $
$Id: CHANGELOG,v 1.50 2002/11/17 05:57:32 ballen4705 Exp $
Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
......@@ -24,9 +24,13 @@ California, Santa Cruz. http://ssrc.soe.ucsc.edu/
NOTES FOR FUTURE RELEASES: see TODO file.
CURRENT RELEASE (see VERSION file in this directory):
smartmontools-5.0.45
Fixed bug in smartd where testunitready logic inverted
prevented functioning on scsi devices.
Added testunitnotready to smartctl for symmetry with smartd.
Brabec: added Czech descriptions to .spec file
Brabec: corrected comment in smartd.conf example
......
......@@ -36,7 +36,7 @@
#define GBUF_SIZE 65535
const char* CVSid4="$Id: scsiprint.c,v 1.10 2002/10/28 23:46:59 ballen4705 Exp $"
const char* CVSid4="$Id: scsiprint.c,v 1.11 2002/11/17 05:57:32 ballen4705 Exp $"
CVSID3 CVSID4 CVSID5 CVSID6;
// control block which points to external global control variables
......@@ -297,9 +297,15 @@ void scsiPrintStopStart ( int device )
**/
}
void scsiPrintMain (int fd)
void scsiPrintMain (char *device, int fd)
{
// See if unit accepts SCSI commmands from us
if (testunitnotready(fd)){
printf("Smartctl: device %s failed Test Unit Ready\n", device);
exit(1);
}
if (con->driveinfo)
scsiGetDriveInfo(fd);
......
......@@ -36,7 +36,7 @@
#define GBUF_SIZE 65535
const char* CVSid4="$Id: scsiprint.cpp,v 1.10 2002/10/28 23:46:59 ballen4705 Exp $"
const char* CVSid4="$Id: scsiprint.cpp,v 1.11 2002/11/17 05:57:32 ballen4705 Exp $"
CVSID3 CVSID4 CVSID5 CVSID6;
// control block which points to external global control variables
......@@ -297,9 +297,15 @@ void scsiPrintStopStart ( int device )
**/
}
void scsiPrintMain (int fd)
void scsiPrintMain (char *device, int fd)
{
// See if unit accepts SCSI commmands from us
if (testunitnotready(fd)){
printf("Smartctl: device %s failed Test Unit Ready\n", device);
exit(1);
}
if (con->driveinfo)
scsiGetDriveInfo(fd);
......
......@@ -28,9 +28,9 @@
#define SCSI_PRINT_H_
#ifndef CVSID5
#define CVSID5 "$Id: scsiprint.h,v 1.7 2002/10/28 23:46:59 ballen4705 Exp $\n"
#define CVSID5 "$Id: scsiprint.h,v 1.8 2002/11/17 05:57:32 ballen4705 Exp $\n"
#endif
void scsiPrintMain(int fd);
void scsiPrintMain(char *device, int fd);
#endif
......@@ -39,7 +39,7 @@
#include "extern.h"
extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4;
const char* CVSid5="$Id: smartctl.c,v 1.27 2002/11/07 19:07:20 ballen4705 Exp $"
const char* CVSid5="$Id: smartctl.c,v 1.28 2002/11/17 05:57:32 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6;
// This is a block containing all the "control variables". We declare
......@@ -351,7 +351,7 @@ int main (int argc, char **argv){
if (tryata)
retval=ataPrintMain(fd);
else if (tryscsi)
scsiPrintMain (fd);
scsiPrintMain (device, fd);
else {
pout("Smartctl: specify if this is an ATA or SCSI device with the -%c or -%c options respectively.\n",
NOTSCSIDEVICE, NOTATADEVICE);
......
......@@ -39,7 +39,7 @@
#include "extern.h"
extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4;
const char* CVSid5="$Id: smartctl.cpp,v 1.27 2002/11/07 19:07:20 ballen4705 Exp $"
const char* CVSid5="$Id: smartctl.cpp,v 1.28 2002/11/17 05:57:32 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6;
// This is a block containing all the "control variables". We declare
......@@ -351,7 +351,7 @@ int main (int argc, char **argv){
if (tryata)
retval=ataPrintMain(fd);
else if (tryscsi)
scsiPrintMain (fd);
scsiPrintMain (device, fd);
else {
pout("Smartctl: specify if this is an ATA or SCSI device with the -%c or -%c options respectively.\n",
NOTSCSIDEVICE, NOTATADEVICE);
......
......@@ -30,7 +30,7 @@ Packager: Bruce Allen <smartmontools-support@lists.sourceforge.net>
# http://ftp1.sourceforge.net/smartmontools/smartmontools-%{version}-%{release}.tar.gz
# CVS ID of this file is:
# $Id: smartmontools.spec,v 1.68 2002/11/17 05:30:11 ballen4705 Exp $
# $Id: smartmontools.spec,v 1.69 2002/11/17 05:57:32 ballen4705 Exp $
# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
# Home page: http://smartmontools.sourceforge.net/
......@@ -252,6 +252,19 @@ fi
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* Sun Nov 17 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
- Fixed bug in smartd where testunitready logic inverted
prevented functioning on scsi devices.
- Added testunitnotready to smartctl for symmetry with smartd.
- Brabec: added Czech descriptions to .spec file
- Brabec: corrected comment in smartd.conf example
- Changed way that entries in the ATA error log are printed,
to make it clearer which is the most recent error and
which is the oldest one.
- Changed Temperature_Centigrade to Temperature_Celsius.
The term "Centigrade" ceased to exist in 1948. (c.f
http://www.bartleby.com/64/C004/016.html).
* Wed Nov 13 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
- smartd SCSI devices: can now send warning email message on failure
- Added a new smartd configuration file Directive: -M ADDRESS.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment