diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index d3ddd3bd0fc52f9a52969e14b0bbb9f5569a4ea6..72d7288485dd9be0f260628538e591a99b96a7cf 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.23 2002/10/26 09:24:26 ballen4705 Exp $ +$Id: CHANGELOG,v 1.24 2002/10/26 09:38:26 ballen4705 Exp $ Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> @@ -42,7 +42,8 @@ smartmontools-5.0-VERSION since the fd to the device was open. smartd now opens the device when it needs to read values, then closes it. Also, if one time around it can't open the device, it simply prints a warning - message but does not give up. + message but does not give up. Have eliminated the .fd field from + data structures -- no longer gets used. smartd now opens SCSI devices as well using O_RDONLY rather than O_RDWR. If someone can no longer monitor a SCSI device that used diff --git a/sm5/smartd.c b/sm5/smartd.c index 7944644f21e99882ea425876990d6ea803f3028a..1e041e38b03e25ede8d84f055c618a3aa6495877 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -39,7 +39,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.c,v 1.32 2002/10/26 09:24:26 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.c,v 1.33 2002/10/26 09:38:26 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; // This function prints either to stdout or to the syslog as needed @@ -185,7 +185,6 @@ int atadevicescan (atadevices_t *devices, char *device){ } printout(LOG_INFO,"%s Found and is SMART capable. Adding to \"monitor\" list.\n",device); - devices[numatadevices].fd = fd; strcpy(devices[numatadevices].devicename, device); devices[numatadevices].drive = drive; @@ -244,7 +243,6 @@ int scsidevicescan (scsidevices_t *devices, char *device){ // now we can proceed to register the device printout(LOG_INFO, "Device: %s, Found and is SMART capable. Adding to \"monitor\" list.\n",device); - devices[numscsidevices].fd = fd; strcpy(devices[numscsidevices].devicename,device); // register the supported functionality. The smartd code does not diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index f376bbfdff51ff9c89137bc45b0c0acf3199173d..5651802da141ff22144bc48737160ac22ede8233 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -39,7 +39,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.cpp,v 1.32 2002/10/26 09:24:26 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.cpp,v 1.33 2002/10/26 09:38:26 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; // This function prints either to stdout or to the syslog as needed @@ -185,7 +185,6 @@ int atadevicescan (atadevices_t *devices, char *device){ } printout(LOG_INFO,"%s Found and is SMART capable. Adding to \"monitor\" list.\n",device); - devices[numatadevices].fd = fd; strcpy(devices[numatadevices].devicename, device); devices[numatadevices].drive = drive; @@ -244,7 +243,6 @@ int scsidevicescan (scsidevices_t *devices, char *device){ // now we can proceed to register the device printout(LOG_INFO, "Device: %s, Found and is SMART capable. Adding to \"monitor\" list.\n",device); - devices[numscsidevices].fd = fd; strcpy(devices[numscsidevices].devicename,device); // register the supported functionality. The smartd code does not diff --git a/sm5/smartd.h b/sm5/smartd.h index 74fdb97653d7fa92da3ae70e7a4e5d6c2c422807..64e2239410cc10b022820b469cc05bf8735c3e5d 100644 --- a/sm5/smartd.h +++ b/sm5/smartd.h @@ -23,7 +23,7 @@ */ #ifndef CVSID7 -#define CVSID7 "$Id: smartd.h,v 1.9 2002/10/26 09:24:26 ballen4705 Exp $\n" +#define CVSID7 "$Id: smartd.h,v 1.10 2002/10/26 09:38:26 ballen4705 Exp $\n" #endif // Configuration file @@ -57,7 +57,6 @@ unsigned char emailnotification = FALSE; unsigned char printcopyleft = FALSE; typedef struct atadevices_s { - int fd; int selftest; struct hd_driveid drive; struct ata_smart_values smartval; @@ -66,7 +65,6 @@ typedef struct atadevices_s { } atadevices_t; typedef struct scsidevices_s { - int fd; unsigned char SmartPageSupported; unsigned char TempPageSupported; unsigned char Temperature;