Revision 39ec9a50 hw/scsi-disk.c

b/hw/scsi-disk.c
787 787
        }
788 788
        DPRINTF("Unsupported Service Action In\n");
789 789
        goto illegal_request;
790
    case REPORT_LUNS:
791
        if (req->cmd.xfer < 16)
792
            goto illegal_request;
793
        memset(outbuf, 0, 16);
794
        outbuf[3] = 8;
795
        buflen = 16;
796
        break;
790 797
    default:
791 798
        goto illegal_request;
792 799
    }
......
904 911
    case READ_TOC:
905 912
    case GET_CONFIGURATION:
906 913
    case SERVICE_ACTION_IN:
914
    case REPORT_LUNS:
907 915
        rc = scsi_disk_emulate_command(&r->req, outbuf);
908 916
        if (rc > 0) {
909 917
            r->iov.iov_len = rc;
......
932 940
        r->sector_count = len * s->cluster_size;
933 941
        is_write = 1;
934 942
        break;
935
    case 0xa0:
936
        DPRINTF("Report LUNs (len %d)\n", len);
937
        if (len < 16)
938
            goto fail;
939
        memset(outbuf, 0, 16);
940
        outbuf[3] = 8;
941
        r->iov.iov_len = 16;
942
        break;
943 943
    case VERIFY:
944 944
        DPRINTF("Verify (sector %" PRId64 ", count %d)\n", lba, len);
945 945
        break;

Also available in: Unified diff