[SCM] Samba Shared Repository - branch master updated
Björn Jacke
bjacke at samba.org
Wed Jun 9 07:27:05 MDT 2010
The branch, master has been updated
via 6a6bb76... s3: fix calculation of st_blocks in streams_xattr
via 687c42e... s3: fix calculation of st_blocks in init_stat_ex_from_stat
from 8823bdc... Added guids for the validated writes.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6a6bb768c6542d738a8b2b6da282159a65ed611d
Author: Björn Jacke <bj at sernet.de>
Date: Wed Jun 9 15:24:26 2010 +0200
s3: fix calculation of st_blocks in streams_xattr
Thanks to Joachim Schmitz for finding that miscalculation.
commit 687c42ee6526ff5deb9f3a8d7c13667b520b7440
Author: Björn Jacke <bj at sernet.de>
Date: Wed Jun 9 15:21:24 2010 +0200
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!
-----------------------------------------------------------------------
Summary of changes:
source3/lib/system.c | 2 +-
source3/modules/vfs_streams_xattr.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 7859c61..2877ba9 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
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index aa7ef08..218e5ec 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -238,7 +238,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
sbuf->st_ex_ino = stream_inode(sbuf, io->xattr_name);
sbuf->st_ex_mode &= ~S_IFMT;
sbuf->st_ex_mode |= S_IFREG;
- sbuf->st_ex_blocks = sbuf->st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ sbuf->st_ex_blocks = sbuf->st_ex_size / STAT_ST_BLOCKSIZE + 1;
return 0;
}
@@ -291,7 +291,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
smb_fname->st.st_ex_mode &= ~S_IFMT;
smb_fname->st.st_ex_mode |= S_IFREG;
smb_fname->st.st_ex_blocks =
- smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1;
result = 0;
fail:
@@ -342,7 +342,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle,
smb_fname->st.st_ex_mode &= ~S_IFMT;
smb_fname->st.st_ex_mode |= S_IFREG;
smb_fname->st.st_ex_blocks =
- smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1;
result = 0;
--
Samba Shared Repository
More information about the samba-cvs
mailing list