summaryrefslogtreecommitdiffstats
path: root/source/smbd/dfree.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/dfree.c')
-rw-r--r--source/smbd/dfree.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c
index 71b3f2bf772..e55e40c030d 100644
--- a/source/smbd/dfree.c
+++ b/source/smbd/dfree.c
@@ -1,5 +1,6 @@
/*
- Unix SMB/CIFS implementation.
+ Unix SMB/Netbios implementation.
+ Version 1.9.
functions to calculate the free disk space
Copyright (C) Andrew Tridgell 1998
@@ -21,8 +22,9 @@
#include "includes.h"
/****************************************************************************
-normalise for DOS usage
+ Normalise for DOS usage.
****************************************************************************/
+
static void disk_norm(BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
/* check if the disk is beyond the max disk size */
@@ -59,10 +61,10 @@ static void disk_norm(BOOL small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,
/****************************************************************************
- return number of 1K blocks available on a path and total number
+ Return number of 1K blocks available on a path and total number.
****************************************************************************/
-static SMB_BIG_UINT disk_free(const char *path, BOOL small_query,
+static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
int dfree_retval;
@@ -87,7 +89,7 @@ static SMB_BIG_UINT disk_free(const char *path, BOOL small_query,
slprintf(syscmd, sizeof(syscmd)-1, "%s %s", dfree_command, path);
DEBUG (3, ("disk_free: Running command %s\n", syscmd));
- lines = file_lines_pload(syscmd, NULL);
+ lines = file_lines_pload(syscmd, NULL, True);
if (lines) {
char *line = lines[0];
@@ -153,12 +155,12 @@ static SMB_BIG_UINT disk_free(const char *path, BOOL small_query,
return(dfree_retval);
}
-
/****************************************************************************
-wrap it to get filenames right
+ Wrap it to get filenames right.
****************************************************************************/
+
SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query,
SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
- return disk_free(path,small_query, bsize,dfree,dsize);
+ return(disk_free(dos_to_unix_static(path),small_query, bsize,dfree,dsize));
}