summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-04-22 10:31:29 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-04-22 10:31:29 +0200
commit1ef2b1d3a149348539565902825bb168a52673a1 (patch)
tree5aa2c65ee859c4b3dc9ac93399d9aaea1ec7a087 /tools.c
parentfae6bae6d47b5bf9328627cad851be6a227fd982 (diff)
downloadvdr-1ef2b1d3a149348539565902825bb168a52673a1.tar.gz
vdr-1ef2b1d3a149348539565902825bb168a52673a1.tar.bz2
Fixed checking for free disk space, so that it works with NFS mounted drives
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools.c b/tools.c
index c303a8ab..5a3730d3 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 1.32 2001/04/01 14:13:36 kls Exp $
+ * $Id: tools.c 1.33 2001/04/22 10:31:29 kls Exp $
*/
#define _GNU_SOURCE
@@ -120,7 +120,7 @@ const char *AddDirectory(const char *DirName, const char *FileName)
return buf;
}
-#define DFCMD "df -m '%s'"
+#define DFCMD "df -m -P '%s'"
uint FreeDiskSpaceMB(const char *Directory)
{
@@ -132,7 +132,7 @@ uint FreeDiskSpaceMB(const char *Directory)
if (p) {
char *s;
while ((s = readline(p)) != NULL) {
- if (*s == '/') {
+ if (strchr(s, '/')) {
uint available;
sscanf(s, "%*s %*d %*d %u", &available);
Free = available;