From cf88c714fd7ed2fc8458bb2fced97c60c010a1e6 Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Sun, 17 Nov 2002 05:30:11 +0000 Subject: [PATCH] release 45 git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@290 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/scsicmds.c | 6 +++--- sm5/scsicmds.cpp | 6 +++--- sm5/scsicmds.h | 4 ++-- sm5/smartd.c | 7 ++++--- sm5/smartd.cpp | 7 ++++--- sm5/smartmontools.spec | 4 ++-- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/sm5/scsicmds.c b/sm5/scsicmds.c index 12184f2ca..66462133f 100644 --- a/sm5/scsicmds.c +++ b/sm5/scsicmds.c @@ -33,7 +33,7 @@ #include <scsi/scsi.h> #include "scsicmds.h" -const char *CVSid3="$Id: scsicmds.c,v 1.12 2002/10/28 23:46:59 ballen4705 Exp $" CVSID4; +const char *CVSid3="$Id: scsicmds.c,v 1.13 2002/11/17 05:30:11 ballen4705 Exp $" CVSID4; UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf) @@ -408,8 +408,8 @@ UINT8 receivediagnostic (int device, UINT8 pagenum, UINT8 *pBuf) } - -UINT8 testunitready (int device) +// See if the device accepts IOCTLs at all... +UINT8 testunitnotready (int device) { return ioctl( device, 2 , NULL); diff --git a/sm5/scsicmds.cpp b/sm5/scsicmds.cpp index 65ef61b19..8afc8cba7 100644 --- a/sm5/scsicmds.cpp +++ b/sm5/scsicmds.cpp @@ -33,7 +33,7 @@ #include <scsi/scsi.h> #include "scsicmds.h" -const char *CVSid3="$Id: scsicmds.cpp,v 1.12 2002/10/28 23:46:59 ballen4705 Exp $" CVSID4; +const char *CVSid3="$Id: scsicmds.cpp,v 1.13 2002/11/17 05:30:11 ballen4705 Exp $" CVSID4; UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf) @@ -408,8 +408,8 @@ UINT8 receivediagnostic (int device, UINT8 pagenum, UINT8 *pBuf) } - -UINT8 testunitready (int device) +// See if the device accepts IOCTLs at all... +UINT8 testunitnotready (int device) { return ioctl( device, 2 , NULL); diff --git a/sm5/scsicmds.h b/sm5/scsicmds.h index 8e1a3e910..0960766e6 100644 --- a/sm5/scsicmds.h +++ b/sm5/scsicmds.h @@ -27,7 +27,7 @@ #define SCSICMDS_H_ #ifndef CVSID4 -#define CVSID4 "$Id: scsicmds.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" +#define CVSID4 "$Id: scsicmds.h,v 1.8 2002/11/17 05:30:11 ballen4705 Exp $\n" #endif #ifndef LOG_SENSE @@ -248,7 +248,7 @@ struct modedatahdr { #define LOGPAGEHDRSIZE 4 /* STANDARD SCSI Commands */ -UINT8 testunitready (int device); +UINT8 testunitnotready (int device); UINT8 stdinquiry ( int device, UINT8 *pBuffer); diff --git a/sm5/smartd.c b/sm5/smartd.c index fa0b6fee6..c709e3579 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -45,7 +45,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid6="$Id: smartd.c,v 1.65 2002/11/16 18:23:37 ballen4705 Exp $" +const char *CVSid6="$Id: smartd.c,v 1.66 2002/11/17 05:30:11 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; // global variable used for control of printing, passing arguments, etc. @@ -447,8 +447,9 @@ int scsidevicescan(scsidevices_t *devices, cfgfile *cfg){ return 1; printout(LOG_INFO,"Device: %s, opened\n", device); - // check that it's ready for commands - if (testunitready(fd)){ + // check that it's ready for commands. Is this really needed? It's + // not part of smartctl at all. + if (testunitnotready(fd)){ printout(LOG_INFO,"Device: %s, Failed Test Unit Ready\n", device); close(fd); return 2; diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index 962f428a9..7912baa78 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -45,7 +45,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid6="$Id: smartd.cpp,v 1.65 2002/11/16 18:23:37 ballen4705 Exp $" +const char *CVSid6="$Id: smartd.cpp,v 1.66 2002/11/17 05:30:11 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID7; // global variable used for control of printing, passing arguments, etc. @@ -447,8 +447,9 @@ int scsidevicescan(scsidevices_t *devices, cfgfile *cfg){ return 1; printout(LOG_INFO,"Device: %s, opened\n", device); - // check that it's ready for commands - if (testunitready(fd)){ + // check that it's ready for commands. Is this really needed? It's + // not part of smartctl at all. + if (testunitnotready(fd)){ printout(LOG_INFO,"Device: %s, Failed Test Unit Ready\n", device); close(fd); return 2; diff --git a/sm5/smartmontools.spec b/sm5/smartmontools.spec index 6cd71ec3f..61723b7f9 100644 --- a/sm5/smartmontools.spec +++ b/sm5/smartmontools.spec @@ -1,4 +1,4 @@ -Release: 44 +Release: 45 Summary: SMARTmontools - for monitoring S.M.A.R.T. disks and devices Summary(cs): SMARTmontools - pro monitorov�n� S.M.A.R.T. disk� a za��zen� Summary(de): SMARTmontools - zur �berwachung von S.M.A.R.T.-Platten und-Ger�ten @@ -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.67 2002/11/16 18:28:25 ballen4705 Exp $ +# $Id: smartmontools.spec,v 1.68 2002/11/17 05:30:11 ballen4705 Exp $ # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> # Home page: http://smartmontools.sourceforge.net/ -- GitLab