svn commit: samba r2700 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Mon Sep 27 23:57:59 GMT 2004


Author: jra
Date: 2004-09-27 23:57:59 +0000 (Mon, 27 Sep 2004)
New Revision: 2700

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/smbd&rev=2700&nolog=1

Log:
Fix bug where we could incorrectly set sparse attribute. Don't use
st_blksize, it isn't what you think....
Jeremy.
--his line, and those below, will be ignored--

M    source/smbd/dosmode.c

Modified:
   branches/SAMBA_3_0/source/smbd/dosmode.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/dosmode.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/dosmode.c	2004-09-27 22:06:27 UTC (rev 2699)
+++ branches/SAMBA_3_0/source/smbd/dosmode.c	2004-09-27 23:57:59 UTC (rev 2700)
@@ -135,8 +135,8 @@
 	if (S_ISDIR(sbuf->st_mode))
 		result = aDIR | (result & aRONLY);
 
-#if defined (HAVE_STAT_ST_BLOCKS) && defined (HAVE_STAT_ST_BLKSIZE)
-	if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)sbuf->st_blksize) {
+#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
+	if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)STAT_ST_BLOCKSIZE) {
 		result |= FILE_ATTRIBUTE_SPARSE;
 	}
 #endif



More information about the samba-cvs mailing list