X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fide.c;h=d40755132824b44480e581419f571998973c79bd;hb=94429f4b9268cf4d5f86dee5c3d929110811ac80;hp=3ef7d4da25964a3881a2765d531ec5d1f79b6c98;hpb=94f67717b6461df514dc225ed84f03b44c44061b;p=palacios.git diff --git a/palacios/src/devices/ide.c b/palacios/src/devices/ide.c index 3ef7d4d..d407551 100644 --- a/palacios/src/devices/ide.c +++ b/palacios/src/devices/ide.c @@ -1314,6 +1314,15 @@ static int write_port_std(struct guest_info * core, ushort_t port, void * src, u PrintDebug("Attempting to select a non-present drive\n"); channel->error_reg.abort = 1; channel->status.error = 1; + } else { + channel->status.busy = 0; + channel->status.ready = 1; + channel->status.data_req = 0; + channel->status.error = 0; + channel->status.seek_complete = 1; + + channel->dma_status.active = 0; + channel->dma_status.err = 0; } break; @@ -1540,8 +1549,10 @@ static int connect_fn(struct v3_vm_info * vm, return -1; } - strncpy(drive->model, model_str, sizeof(drive->model) - 1); - + if (model_str != NULL) { + strncpy(drive->model, model_str, sizeof(drive->model) - 1); + } + if (strcasecmp(type_str, "cdrom") == 0) { drive->drive_type = BLOCK_CDROM;