From d621bf11ea8a2bb2ada2953c9d2c5d1b47041286 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Apr 2002 12:52:18 +0000 Subject: fixed the display of the 'size on disk' property of files from w2k. (This used to be commit 699a1d9f46fcc9d6aad56ed1b44d1295ee828b2b) --- source3/smbd/trans2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 1972e9c8c8..adae7e0b3c 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1352,12 +1352,13 @@ static int call_trans2qfsinfo(connection_struct *conn, break; case SMB_QUERY_FS_SIZE_INFO: { - SMB_BIG_UINT dfree,dsize,bsize; + SMB_BIG_UINT dfree,dsize,bsize, secs_per_unit; data_len = 24; conn->vfs_ops.disk_free(conn,".",False,&bsize,&dfree,&dsize); - SBIG_UINT(pdata,0,dsize); - SBIG_UINT(pdata,8,dfree); - SIVAL(pdata,16,bsize/512); + secs_per_unit = 2; + SBIG_UINT(pdata,0,dsize*(bsize/(512*secs_per_unit))); + SBIG_UINT(pdata,8,dfree*(bsize/(512*secs_per_unit))); + SIVAL(pdata,16,secs_per_unit); SIVAL(pdata,20,512); break; } -- cgit