Skip to main content
Sign in
Snippets Groups Projects
Commit c96abf24 authored by ballen4705's avatar ballen4705
Browse files

[BA] smartd: doesn't close file descriptors of ATA packet devices

that are scanned. Fixed.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@1188 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 47bbbd7b
Branches
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.234 2003/10/31 10:02:01 ballen4705 Exp $
$Id: CHANGELOG,v 1.235 2003/10/31 20:37:49 ballen4705 Exp $
Maintainers / Developers Key:
[BA] Bruce Allen
......@@ -23,6 +23,11 @@ CURRENT DEVELOPMENT VERSION (see VERSION file in this directory):
<ADDITIONS TO THE CHANGE LOG SHOULD BE ADDED HERE, PLEASE>
smartmontools 5.23
[BA] smartd: doesn't close file descriptors of ATA packet devices
that are scanned.
[BA] Added reload/report targets to the smartmontools init script.
reload: reloads config file
report: send SIGUSR1 to check devices now
......
......
......@@ -65,7 +65,7 @@
extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid,
*knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid;
const char *smartd_c_cvsid="$Id: smartd.c,v 1.226 2003/10/27 11:23:32 ballen4705 Exp $"
const char *smartd_c_cvsid="$Id: smartd.c,v 1.227 2003/10/31 20:37:49 ballen4705 Exp $"
ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID KNOWNDRIVES_H_CVSID
SCSICMDS_H_CVSID SMARTD_H_CVSID UTILITY_H_CVSID;
......@@ -749,16 +749,14 @@ int ATADeviceScan(cfgfile *cfg){
con->fixfirmwarebug = cfg->fixfirmwarebug;
// Get drive identity structure
if ((retid=ataReadHDIdentity (fd,&drive))<0){
if ((retid=ataReadHDIdentity (fd,&drive))){
if (retid<0)
// Unable to read Identity structure
PrintOut(LOG_INFO,"Device: %s, unable to read Device Identity Structure\n",name);
deviceclose(fd);
return 2;
}
if (retid){
PrintOut(LOG_INFO,"Device: %s, not ATA, no IDENTIFY DEVICE Structure\n",name);
else
PrintOut(LOG_INFO,"Device: %s, packet devices [this device %s] not SMART capable\n",
name, packetdevicetype(retid-1));
deviceclose(fd);
return 2;
}
......
......
......@@ -65,7 +65,7 @@
extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid,
*knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid;
const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.226 2003/10/27 11:23:32 ballen4705 Exp $"
const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.227 2003/10/31 20:37:49 ballen4705 Exp $"
ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID KNOWNDRIVES_H_CVSID
SCSICMDS_H_CVSID SMARTD_H_CVSID UTILITY_H_CVSID;
......@@ -749,16 +749,14 @@ int ATADeviceScan(cfgfile *cfg){
con->fixfirmwarebug = cfg->fixfirmwarebug;
// Get drive identity structure
if ((retid=ataReadHDIdentity (fd,&drive))<0){
if ((retid=ataReadHDIdentity (fd,&drive))){
if (retid<0)
// Unable to read Identity structure
PrintOut(LOG_INFO,"Device: %s, unable to read Device Identity Structure\n",name);
deviceclose(fd);
return 2;
}
if (retid){
PrintOut(LOG_INFO,"Device: %s, not ATA, no IDENTIFY DEVICE Structure\n",name);
else
PrintOut(LOG_INFO,"Device: %s, packet devices [this device %s] not SMART capable\n",
name, packetdevicetype(retid-1));
deviceclose(fd);
return 2;
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment