Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Brain-dead file systems.
Hi Carsten,
Ok, now it´s compiling, but after I compiled without VFAT=1, VDR does
records so:
/video/Die_Goldene_Europa_Show_Gala_der_Preisträger/2002-07-05.20:18.50.
50.rec
My /video is an ext3 journal system, but I have mounted a VFAT Drive. I
need the VFAT option only for my samba... I thought, that VDR looks for
mounted VFATs or, only if the record dir a VFAT??
Greets
Habib
-----Original Message-----
From: Carsten.Koch@icem.de [mailto:Carsten.Koch@icem.de]
Sent: Friday, July 05, 2002 8:06 PM
To: vdr@linuxtv.org
Subject: [vdr] Re: Brain-dead file systems.
Habib Azimi wrote:
>
> Hi Carsten,
>
> I´Ve tested your code modification but while compiling I get an error
> and the GCC stop work:
I apologize.
Here is what I mean in the form of a real patch
that at least compiles without problems here:
--- recording.c.orig Fri Jul 5 20:01:35 2002
+++ recording.c Fri Jul 5 20:02:58 2002
@@ -21,12 +21,15 @@
#define RECEXT ".rec"
#define DELEXT ".del"
+
+#define DATAFORMAT_VFAT "%4d-%02d-%02d.%02d.%02d.%02d.%02d" RECEXT
+#define DATAFORMAT_NORMAL "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
+
#ifdef VFAT
-#define DATAFORMAT "%4d-%02d-%02d.%02d.%02d.%02d.%02d" RECEXT
+#define NAMEFORMAT "%s/%s/" DATAFORMAT_VFAT
#else
-#define DATAFORMAT "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
+#define NAMEFORMAT "%s/%s/" DATAFORMAT_NORMAL
#endif
-#define NAMEFORMAT "%s/%s/" DATAFORMAT
#define RESUMEFILESUFFIX "/resume.vdr"
#define SUMMARYFILESUFFIX "/summary.vdr"
@@ -344,7 +347,8 @@
struct tm tm_r;
struct tm t = *localtime_r(&now, &tm_r); // this initializes the
time zone in 't'
t.tm_isdst = -1; // makes sure mktime() will determine the correct
DST setting
- if (7 == sscanf(p + 1, DATAFORMAT, &t.tm_year, &t.tm_mon,
&t.tm_mday, &t.tm_hour, &t.tm_min, &priority, &lifetime)) {
+ if ((7 == sscanf(p + 1, DATAFORMAT_NORMAL, &t.tm_year, &t.tm_mon,
&t.tm_mday, &t.tm_hour, &t.tm_min, &priority, &lifetime)) ||
+ (7 == sscanf(p + 1, DATAFORMAT_VFAT, &t.tm_year, &t.tm_mon,
&t.tm_mday, &t.tm_hour, &t.tm_min, &priority, &lifetime))) {
t.tm_year -= 1900;
t.tm_mon--;
t.tm_sec = 0;
Carsten.
Home |
Main Index |
Thread Index