rpms/smartmontools/devel smartmontools-5.38-cloexec.patch, 1.1, 1.2 smartmontools.spec, 1.43, 1.44
Tomas Smetana (tsmetana)
fedora-extras-commits at redhat.com
Tue Mar 18 08:04:41 UTC 2008
Author: tsmetana
Update of /cvs/pkgs/rpms/smartmontools/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13861
Modified Files:
smartmontools-5.38-cloexec.patch smartmontools.spec
Log Message:
* Tue Mar 18 2008 Tomas Smetana <tsmetana at redhat.com> - 1:5.38-2
- fix FD_CLOEXEC on SCSI device file descriptors not being set
smartmontools-5.38-cloexec.patch:
Index: smartmontools-5.38-cloexec.patch
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/devel/smartmontools-5.38-cloexec.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- smartmontools-5.38-cloexec.patch 10 Mar 2008 12:41:02 -0000 1.1
+++ smartmontools-5.38-cloexec.patch 18 Mar 2008 08:04:30 -0000 1.2
@@ -1,7 +1,7 @@
diff -up smartmontools-5.38/os_linux.cpp.cloexec smartmontools-5.38/os_linux.cpp
---- smartmontools-5.38/os_linux.cpp.cloexec 2008-03-10 10:01:25.000000000 +0100
-+++ smartmontools-5.38/os_linux.cpp 2008-03-10 10:09:26.000000000 +0100
-@@ -171,7 +171,7 @@ static char prev_scsi_dev[128];
+--- smartmontools-5.38/os_linux.cpp.cloexec 2008-03-04 23:09:47.000000000 +0100
++++ smartmontools-5.38/os_linux.cpp 2008-03-18 08:28:20.000000000 +0100
+@@ -171,14 +171,13 @@ static char prev_scsi_dev[128];
// equivalent to open(path, flags)
int deviceopen(const char *pathname, char *type){
@@ -10,7 +10,14 @@
if (0 == strcmp(type,"SCSI")) {
strncpy(prev_scsi_dev, pathname, sizeof(prev_scsi_dev) - 1);
-@@ -186,9 +186,9 @@ int deviceopen(const char *pathname, cha
+ fd = open(pathname, O_RDWR | O_NONBLOCK);
+ if (fd < 0 && errno == EROFS)
+ fd = open(pathname, O_RDONLY | O_NONBLOCK);
+- return fd;
+ } else if (0 == strcmp(type,"ATA")) {
+ // smartd re-opens SCSI devices with "type"==ATA for some reason.
+ // If that was a SCSI generic device (e.g. /dev/sg0) then the
+@@ -186,9 +185,9 @@ int deviceopen(const char *pathname, cha
// The purpose of the next code line is to limit the scope of
// this change as a release is pending (and smartd needs a rewrite).
if (0 == strncmp(pathname, prev_scsi_dev, sizeof(prev_scsi_dev)))
@@ -22,7 +29,7 @@
} else if (0 == strcmp(type,"ATA_3WARE_9000")) {
// the device nodes for this controller are dynamically assigned,
// so we need to check that they exist with the correct major
-@@ -198,7 +198,7 @@ int deviceopen(const char *pathname, cha
+@@ -198,7 +197,7 @@ int deviceopen(const char *pathname, cha
errno=ENXIO;
return -1;
}
@@ -31,7 +38,7 @@
}
else if (0 == strcmp(type,"ATA_3WARE_678K")) {
// the device nodes for this controller are dynamically assigned,
-@@ -209,15 +209,17 @@ int deviceopen(const char *pathname, cha
+@@ -209,15 +208,17 @@ int deviceopen(const char *pathname, cha
errno=ENXIO;
return -1;
}
Index: smartmontools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/devel/smartmontools.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- smartmontools.spec 10 Mar 2008 12:37:22 -0000 1.43
+++ smartmontools.spec 18 Mar 2008 08:04:30 -0000 1.44
@@ -1,7 +1,7 @@
Summary: Tools for monitoring SMART capable hard disks
Name: smartmontools
Version: 5.38
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
Group: System Environment/Base
License: GPLv2+
@@ -105,6 +105,9 @@
%exclude %{_sbindir}/smartd-conf.py[co]
%changelog
+* Tue Mar 18 2008 Tomas Smetana <tsmetana at redhat.com> - 1:5.38-2
+- fix FD_CLOEXEC on SCSI device file descriptors not being set
+
* Mon Mar 10 2008 Tomas Smetana <tsmetana at redhat.com> - 1:5.38-1
- new upstream version
More information about the fedora-extras-commits
mailing list