|
@@ -363,7 +363,7 @@ End;
|
|
|
|
|
|
{
|
|
|
The Diskfree and Disksize functions need a file on the specified drive, since this
|
|
|
- is required for the statfs system call.
|
|
|
+ is required for the fpstatfs system call.
|
|
|
These filenames are set in drivestr[0..26], and have been preset to :
|
|
|
0 - '.' (default drive - hence current dir is ok.)
|
|
|
1 - '/fd0/.' (floppy drive 1 - should be adapted to local system )
|
|
@@ -403,8 +403,8 @@ Function DiskFree(Drive: Byte): int64;
|
|
|
var
|
|
|
fs : tstatfs;
|
|
|
Begin
|
|
|
- if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (StatFS(fixdrivestr[drive],fs)<>-1)) or
|
|
|
- ((not (drivestr[Drive]=nil)) and (StatFS(drivestr[drive],fs)<>-1)) then
|
|
|
+ if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (fpStatFS(fixdrivestr[drive],@fs)<>-1)) or
|
|
|
+ ((not (drivestr[Drive]=nil)) and (fpStatFS(drivestr[drive],@fs)<>-1)) then
|
|
|
Diskfree:=int64(fs.bavail)*int64(fs.bsize)
|
|
|
else
|
|
|
Diskfree:=-1;
|
|
@@ -416,8 +416,8 @@ Function DiskSize(Drive: Byte): int64;
|
|
|
var
|
|
|
fs : tstatfs;
|
|
|
Begin
|
|
|
- if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (StatFS(fixdrivestr[drive],fs)<>-1)) or
|
|
|
- ((not (drivestr[Drive]=nil)) and (StatFS(drivestr[drive],fs)<>-1)) then
|
|
|
+ if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (fpStatFS(fixdrivestr[drive],@fs)<>-1)) or
|
|
|
+ ((not (drivestr[Drive]=nil)) and (fpStatFS(drivestr[drive],@fs)<>-1)) then
|
|
|
DiskSize:=int64(fs.blocks)*int64(fs.bsize)
|
|
|
else
|
|
|
DiskSize:=-1;
|