mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 11:30:44 +02:00
* Bugfix in disksize function.
This commit is contained in:
parent
8a84b20446
commit
65b50cccf1
@ -910,8 +910,10 @@ unit dos;
|
||||
|
||||
function disksize(drive : byte) : longint;
|
||||
|
||||
var fi:OS2FSallocate;
|
||||
|
||||
begin
|
||||
{$IFNDEF OS/2}
|
||||
{$IFNDEF OS2}
|
||||
asm
|
||||
movb 8(%ebp),%dl
|
||||
movb $0x36,%ah
|
||||
@ -954,15 +956,15 @@ unit dos;
|
||||
cwde
|
||||
leave
|
||||
ret
|
||||
end;
|
||||
end
|
||||
else
|
||||
{In OS/2, we use the filesystem information.}
|
||||
begin
|
||||
doserror:=dosQFSinfo(drive,1,FI,sizeof(FI));
|
||||
doserror:=dosqueryFSinfo(drive,1,FI,sizeof(FI));
|
||||
if doserror=0 then
|
||||
diskfree:=FI.cunit*FI.csectorunit*FI.cbsector
|
||||
disksize:=FI.cunit*FI.csectorunit*FI.cbsector
|
||||
else
|
||||
diskfree:=-1;
|
||||
disksize:=-1;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user