Commit c52acf60 authored by Pavel Hrdina's avatar Pavel Hrdina Committed by Kevin Wolf
Browse files

fdc: fix implied seek while there is no media in drive



The Windows uses 'READ' command at the start of an instalation
without checking the 'dir' register. We have to abort the transfer
with an abnormal termination if there is no media in the drive.

Signed-off-by: default avatarPavel Hrdina <phrdina@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent af7b708d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -159,6 +159,10 @@ static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
        drv->sect = sect;
    }

    if (drv->bs == NULL || !bdrv_is_inserted(drv->bs)) {
        ret = 2;
    }

    return ret;
}