summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2485d1def5..df01c0306f 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -57,9 +57,6 @@ extern unsigned int global_clobber_region_line;
enum protocol_types Protocol = PROTOCOL_COREPLUS;
-/* this is used by the chaining code */
-int chain_size = 0;
-
static enum remote_arch_types ra_type = RA_UNKNOWN;
/***********************************************************************
@@ -542,6 +539,15 @@ bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st)
}
/*******************************************************************
+ Returns the size in bytes of the named given the stat struct.
+********************************************************************/
+
+uint64_t get_file_size_stat(const SMB_STRUCT_STAT *sbuf)
+{
+ return sbuf->st_size;
+}
+
+/*******************************************************************
Returns the size in bytes of the named file.
********************************************************************/
@@ -551,7 +557,7 @@ SMB_OFF_T get_file_size(char *file_name)
buf.st_size = 0;
if(sys_stat(file_name,&buf) != 0)
return (SMB_OFF_T)-1;
- return(buf.st_size);
+ return get_file_size_stat(&buf);
}
/*******************************************************************