Increase fake block size earlier to also fix programs that overflow free space calculation
This commit is contained in:
parent
23229f51a1
commit
f8aad5a4a6
1 changed files with 28 additions and 25 deletions
|
@ -2590,7 +2590,8 @@ static void do_info(TrapContext *ctx, Unit *unit, dpacket *packet, uaecptr info,
|
|||
ret = zfile_fs_usage_archive(unit->ui.rootdir, 0, &fsu);
|
||||
fs = true;
|
||||
media = filesys_isvolume(unit) != 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ret = get_fs_usage(unit->ui.rootdir, 0, &fsu);
|
||||
if (ret)
|
||||
err = dos_errno();
|
||||
|
@ -2617,7 +2618,8 @@ static void do_info(TrapContext *ctx, Unit *unit, dpacket *packet, uaecptr info,
|
|||
put_long_host(buf + 16, 0);
|
||||
put_long_host(buf + 24, ('B' << 24) | ('A' << 16) | ('D' << 8) | (0 << 0)); /* ID_UNREADABLE_DISK */
|
||||
put_long_host(buf + 28, 0);
|
||||
} else if (!media) {
|
||||
}
|
||||
else if (!media) {
|
||||
if (!disk_info) {
|
||||
PUT_PCK_RES1(packet, DOS_FALSE);
|
||||
PUT_PCK_RES2(packet, ERROR_NO_DISK);
|
||||
|
@ -2627,7 +2629,8 @@ static void do_info(TrapContext *ctx, Unit *unit, dpacket *packet, uaecptr info,
|
|||
put_long_host(buf + 16, 0);
|
||||
put_long_host(buf + 24, -1); /* ID_NO_DISK_PRESENT */
|
||||
put_long_host(buf + 28, 0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (fs && currprefs.filesys_limit) {
|
||||
if (fsu.total > (uae_s64)currprefs.filesys_limit * 1024) {
|
||||
uae_s64 oldtotal = fsu.total;
|
||||
|
@ -2641,7 +2644,7 @@ static void do_info(TrapContext *ctx, Unit *unit, dpacket *packet, uaecptr info,
|
|||
numblocks = fsu.total / blocksize;
|
||||
if (numblocks <= 10)
|
||||
numblocks = 10;
|
||||
if (numblocks <= 0x7fffffff)
|
||||
if (numblocks < 0x02000000)
|
||||
break;
|
||||
blocksize *= 2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue