1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added log messages when deleting recordings in case the disk runs full while recording

This commit is contained in:
Klaus Schmidinger 2002-03-09 10:45:10 +01:00
parent eb89599c58
commit a9fd732a72
2 changed files with 6 additions and 1 deletions

View File

@ -1081,3 +1081,5 @@ Video Disk Recorder Revision History
- The new SVDRP command VOLU can be used to control the audio volume (suggested - The new SVDRP command VOLU can be used to control the audio volume (suggested
by Mirko Günther). by Mirko Günther).
- Fixed resetting 'mute' state when setting the volume to a non-zero value. - Fixed resetting 'mute' state when setting the volume to a non-zero value.
- Added log messages when deleting recordings in case the disk runs full while
recording.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 1.55 2002/03/07 17:07:04 kls Exp $ * $Id: recording.c 1.56 2002/03/09 10:43:42 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -86,6 +86,7 @@ void AssertFreeDiskSpace(int Priority)
if (!LockFile.Lock()) if (!LockFile.Lock())
return; return;
// Remove the oldest file that has been "deleted": // Remove the oldest file that has been "deleted":
isyslog(LOG_INFO, "low disk space while recording, trying to remove a deleted recording...");
cRecordings Recordings; cRecordings Recordings;
if (Recordings.Load(true)) { if (Recordings.Load(true)) {
cRecording *r = Recordings.First(); cRecording *r = Recordings.First();
@ -101,6 +102,7 @@ void AssertFreeDiskSpace(int Priority)
} }
} }
// No "deleted" files to remove, so let's see if we can delete a recording: // No "deleted" files to remove, so let's see if we can delete a recording:
isyslog(LOG_INFO, "...no deleted recording found, trying to delete an old recording...");
if (Recordings.Load(false)) { if (Recordings.Load(false)) {
cRecording *r = Recordings.First(); cRecording *r = Recordings.First();
cRecording *r0 = NULL; cRecording *r0 = NULL;
@ -122,6 +124,7 @@ void AssertFreeDiskSpace(int Priority)
return; return;
} }
// Unable to free disk space, but there's nothing we can do about that... // Unable to free disk space, but there's nothing we can do about that...
isyslog(LOG_INFO, "...no old recording found, giving up");
Interface->Confirm(tr("Low disk space!"), 30); Interface->Confirm(tr("Low disk space!"), 30);
} }
LastFreeDiskCheck = time(NULL); LastFreeDiskCheck = time(NULL);