Message-Id: <3.0.1.32.19970320195142.00e589e0@mail.student.utwente.nl> Date: Thu, 20 Mar 1997 19:51:42 +0100 To: Eli Zaretskii From: Erik Post Subject: Re: novice errors? dpmi, info, groff, df Cc: djgpp AT delorie DOT com In-Reply-To: References: <9703191609 DOT aa00925 AT paris DOT ics DOT uci DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 18:10 20-3-97 +0300, you wrote: >Seems like a definite bug in the NT DOS box when dealing with an NTFS >drive: they should have returned something like DX = 65514 and >BX = 42916, so there's no way these would overflow a 16-bit unsigned >int. Adding low and high words of each register gives some >approximation: > > DX_low + DX_high = 31249 + 28524 = 59773 > BX_low + BX_high = 31249 + 11826 = 43075 > >so, using these, the total disk space is 32768 * 59773 = 1.96GB and the >free space is 32768 * 43075 = 1.41GB. But this might be pure >coincidence, I would like to see some confirmation in other cases, or >from somebody who knows NT, before using it to fix `statfs'. These are the results from my computer running NT 4.0 with a NTFS partition: CHKDSK on D: (NTFS) The type of the file system is NTFS. Warning! F parameter not specified Running CHKDSK in read-only mode. CHKDSK is verifying files... File verification completed. CHKDSK is verifying indexes... Index verification completed. CHKDSK is verifying security descriptors... Security descriptor verification completed. 830560 kilobytes total disk space. 524573 kilobytes in 7793 user files. 2924 kilobytes in 377 indexes. 17435 kilobytes in use by the system. 4096 kilobytes occupied by the logfile. 285627 kilobytes available on disk. 512 bytes in each allocation unit. 1661120 total allocation units on disk. 571255 allocation units available on disk. Test program Dan wrote + adaption to statfs on d: SUCCESS dx + dx_high: 55342 bx + bx_high: 44521 type=0 bsize=16384 bfree=17851 bavail=17851 files=51910 ffree=17851 But, 55342 * 16384 = 864MB and 44521 * 16384 = 695MB. Things go well on a FAT drive. Hope my contribution helps. Erik Post Student Computer Sciences at University of Twente, The Netherlands e-mail: erik DOT post AT student DOT utwente DOT nl WWW: http://wwwedu.cs.utwente.nl/~post/