Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Brain-dead file systems.



Hi Carsten,

I´Ve tested your code modification but while compiling I get an error
and the GCC stop work:

recording.c: In method `cRecording::cRecording(const char *)':
recording.c:350: parse error before `{'
recording.c:393: confused by earlier errors, bailing out
make: *** [recording.o] Error 1

I hope, I helped you

Habib

-----Original Message-----
From: Carsten.Koch@icem.de [mailto:Carsten.Koch@icem.de] 
Sent: Friday, July 05, 2002 7:41 PM
To: Video Disk Recorder Mailing List
Subject: [vdr] Brain-dead file systems.


Hi list,

IMHO, it get's a bit annoying that cries for help like
"all my recordings are gone since I installed a new VDR version"
keep coming up about once a week on this list.

On the one hand, one could say "jeez, can't those people
read the mailing list archives?".

On the other hand, this does seem like a trap designed
for newbees to fall into.

Of course, I honestly believe Klaus should have never started
to support brain-dead file systems in the first place. ;-)

But against better judgement - just to keep the useless
mailing list traffic down. How about making vdr a bit more
leniant, so at least it finds directories created with
VFAT even if compiled without VFAT and vice versa?

What do you think?
Good idea?
Bad idea?

I do not have a VFAT file system, so it's a bit hard
for me to create a real patch and test it, but I guess
all that is required should look approximately like this:

in recording.c replace 

#ifdef VFAT
#define DATAFORMAT   "%4d-%02d-%02d.%02d.%02d.%02d.%02d" RECEXT
#else
#define DATAFORMAT   "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
#endif
#define NAMEFORMAT   "%s/%s/" DATAFORMAT

with

#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 NAMEFORMAT   "%s/%s/" DATAFORMAT_VFAT
#else
#define NAMEFORMAT   "%s/%s/" DATAFORMAT_NORMAL
#endif

and replace
     if (7 == sscanf(p + 1, DATAFORMAT, &t.tm_year, &t.tm_mon,
&t.tm_mday, &t.tm_hour, &t.tm_min, &priority, &lifetime)) {
with
     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)) {

would anyone with both normal an VFAT recordings would like to test
this?

If it works, maybe Klaus might want to put this into one of
the next VDR releases?


Carsten.








Home | Main Index | Thread Index