git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8823bdc
)
s3: fix calculation of st_blocks in init_stat_ex_from_stat
author
Björn Jacke
<bj@sernet.de>
Wed, 9 Jun 2010 13:21:24 +0000
(15:21 +0200)
committer
Björn Jacke
<bj@sernet.de>
Wed, 9 Jun 2010 13:27:38 +0000
(15:27 +0200)
this is just relevant for the very rare systems that don't have the st_blocks
struct member. This is a fixup of the fix for bug 7474.
Thanks to Joachim Schmitz for spotting this!
source3/lib/system.c
patch
|
blob
|
history
diff --git
a/source3/lib/system.c
b/source3/lib/system.c
index 7859c61087a2d8aa4e175a494b1fa2d4cd499e9d..2877ba9fd83001cfdcf8c7b6f164e32367396a1b 100644
(file)
--- a/
source3/lib/system.c
+++ b/
source3/lib/system.c
@@
-543,7
+543,7
@@
static void init_stat_ex_from_stat (struct stat_ex *dst,
#ifdef HAVE_STAT_ST_BLOCKS
dst->st_ex_blocks = src->st_blocks;
#else
- dst->st_ex_blocks = src->st_size
% STAT_ST_BLOCKSIZE
+ 1;
+ dst->st_ex_blocks = src->st_size
/ dst->st_ex_blksize
+ 1;
#endif
#ifdef HAVE_STAT_ST_FLAGS