summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-01-29 15:31:56 -0800
committerJeremy Allison <jra@samba.org>2009-01-29 15:31:56 -0800
commitc1332943db6630c1dd916040bdbc9f7627ade148 (patch)
treebd3881893bb50ee5962c8060c7556250db289c7f /source3/lib
parent164fd3cb3398b14fa02f13e5618465678b27ad07 (diff)
parentd1ab1b6482d7413337b42de83d7de1ae016d33e1 (diff)
downloadsamba-c1332943db6630c1dd916040bdbc9f7627ade148.tar.gz
samba-c1332943db6630c1dd916040bdbc9f7627ade148.tar.bz2
samba-c1332943db6630c1dd916040bdbc9f7627ade148.zip
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2485d1def5..195065a1e0 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -542,6 +542,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 +560,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);
}
/*******************************************************************