Revision c557e889 hw/scsi-bus.c

b/hw/scsi-bus.c
549 549
    scsi_req_unref(req);
550 550
}
551 551

  
552
void scsi_device_purge_requests(SCSIDevice *sdev)
553
{
554
    SCSIRequest *req;
555

  
556
    while (!QTAILQ_EMPTY(&sdev->requests)) {
557
        req = QTAILQ_FIRST(&sdev->requests);
558
        sdev->info->cancel_io(req);
559
        scsi_req_dequeue(req);
560
        scsi_req_unref(req);
561
    }
562
}
563

  
552 564
static char *scsibus_get_fw_dev_path(DeviceState *dev)
553 565
{
554 566
    SCSIDevice *d = (SCSIDevice*)dev;

Also available in: Unified diff