From 687c42ee6526ff5deb9f3a8d7c13667b520b7440 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Wed, 9 Jun 2010 15:21:24 +0200 Subject: s3: fix calculation of st_blocks in init_stat_ex_from_stat 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/system.c b/source3/lib/system.c index 7859c61087..2877ba9fd8 100644 --- 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 -- cgit