fixed the display of the 'size on disk' property of files from w2k.
authorAndrew Tridgell <tridge@samba.org>
Fri, 12 Apr 2002 12:52:18 +0000 (12:52 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 12 Apr 2002 12:52:18 +0000 (12:52 +0000)
(This used to be commit 699a1d9f46fcc9d6aad56ed1b44d1295ee828b2b)

source3/smbd/trans2.c

index 1972e9c8c8ef0d5b3cf1ed73a4379cd61ee52b93..adae7e0b3c5d6644ebae0d13d0e755198d3032d6 100644 (file)
@@ -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;
     }