Skip to content

Commit a298c20

Browse files
committed
add a small wait in MEDIA CHECK to fix PCjr.
1 parent c04170d commit a298c20

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sys/commands.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ uint16_t Media_check_cmd(SYSREQ far *req)
2828
int reply;
2929
int64_t old_status, new_status;
3030

31+
int i=0;
3132

33+
// Avoid race condition that only happens on PCjr systems
34+
// I do not know why this works. -Thom
35+
for (i=0;i<8192;i++);
36+
3237
if (req->unit >= FN_MAX_DEV) {
3338
consolef("Invalid Media Check unit: %i\n", req->unit);
3439
return ERROR_BIT | UNKNOWN_UNIT;

0 commit comments

Comments
 (0)