summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--tools.c12
3 files changed, 10 insertions, 7 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0c34d0f3..9758c48e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2271,6 +2271,7 @@ Frank Schmirler <vdr@schmirler.de>
for fixing handling the 'pointer field' in generating and parsing PAT/PMT
for suggesting to use an "instance id" instead of the "resume id" to distinguish
recordings of the same broadcast made by different instances of VDR
+ for fixing EntriesOnSameFileSystem() to avoid using f_fsid, which may be 0
Jörn Reder <joern@zyn.de>
for reporting that a recording may unnecessarily block a device with a CAM, while
diff --git a/HISTORY b/HISTORY
index 9617c43a..873b7418 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6157,7 +6157,7 @@ Video Disk Recorder Revision History
Reinhard Nissl).
- Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen).
-2009-11-01: Version 1.7.10
+2009-11-06: Version 1.7.10
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed wrong bracketing in cChannel::SubtitlingType() etc.
@@ -6177,3 +6177,5 @@ Video Disk Recorder Revision History
- Fixed writing the PCR pid into the PMT in cPatPmtGenerator::GeneratePmt()
(reported by Rene van den Braken).
- Added Slovakian language texts (thanks to Milan Hrala).
+- Fixed EntriesOnSameFileSystem() to avoid using f_fsid, which may be 0 (thanks
+ to Frank Schmirler).
diff --git a/tools.c b/tools.c
index 9ef61f57..fae87635 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.3 2009/05/31 11:43:24 kls Exp $
+ * $Id: tools.c 2.4 2009/11/06 15:21:17 kls Exp $
*/
#include "tools.h"
@@ -279,11 +279,11 @@ cString itoa(int n)
bool EntriesOnSameFileSystem(const char *File1, const char *File2)
{
- struct statfs statFs;
- if (statfs(File1, &statFs) == 0) {
- fsid_t fsid1 = statFs.f_fsid;
- if (statfs(File2, &statFs) == 0)
- return memcmp(&statFs.f_fsid, &fsid1, sizeof(fsid1)) == 0;
+ struct stat st;
+ if (stat(File1, &st) == 0) {
+ dev_t dev1 = st.st_dev;
+ if (stat(File2, &st) == 0)
+ return st.st_dev == dev1;
else
LOG_ERROR_STR(File2);
}