void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense)

{

    SCSIRequest *req;



    while (!QTAILQ_EMPTY(&sdev->requests)) {

        req = QTAILQ_FIRST(&sdev->requests);

        scsi_req_cancel(req);

    }

    sdev->unit_attention = sense;

}

void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense)

{

    SCSIRequest *req;



    while (!QTAILQ_EMPTY(&sdev->requests)) {

        req = QTAILQ_FIRST(&sdev->requests);

        scsi_req_cancel(req);

    }

    sdev->unit_attention = sense;

}

void FUNC_0(SCSIDevice *VAR_0, SCSISense VAR_1)

{

    SCSIRequest *req;



    while (!QTAILQ_EMPTY(&VAR_0->requests)) {

        req = QTAILQ_FIRST(&VAR_0->requests);

        scsi_req_cancel(req);

    }

    VAR_0->unit_attention = VAR_1;

}

void FUNC_0(SCSIDevice *VAR_0, SCSISense VAR_1)
{ SCSIRequest *req; while (!QTAILQ_EMPTY(&VAR_0->requests)) { req = QTAILQ_FIRST(&VAR_0->requests); scsi_req_cancel(req); } VAR_0->unit_attention = VAR_1; }