#include <sys/wait.h>
#include <netinet/in.h>
+#define NO_THUNK_TYPE_SIZE
+#include "thunk.h"
+
#include "cpu.h"
#include "exec-all.h"
#include "vl.h"
-#define NO_THUNK_TYPE_SIZE
-#include "thunk.h"
-
/* debug IDE devices */
//#define DEBUG_IDE
//#define DEBUG_IDE_ATAPI
break;
case WIN_READ:
case WIN_READ_ONCE:
+ if (!s->bs)
+ goto abort_cmd;
s->req_nb_sectors = 1;
ide_sector_read(s);
break;
if (!s->is_cdrom)
goto abort_cmd;
ide_set_signature(s);
- s->status = READY_STAT;
+ s->status = 0x00; /* NOTE: READY is _not_ set */
s->error = 0x01;
break;
case WIN_PACKETCMD:
/* high to low */
for(i = 0;i < 2; i++) {
s = &ide_if[i];
- s->status = READY_STAT;
+ if (s->is_cdrom)
+ s->status = 0x00; /* NOTE: READY is _not_ set */
+ else
+ s->status = READY_STAT;
ide_set_signature(s);
}
}