Revision 1455084e hw/scsi-disk.c

b/hw/scsi-disk.c
518 518

  
519 519
    memset(outbuf, 0, buflen);
520 520

  
521
    if (req->lun || req->cmd.buf[1] >> 5) {
521
    if (req->lun) {
522 522
        outbuf[0] = 0x7f;	/* LUN not supported */
523 523
        return buflen;
524 524
    }
......
1024 1024
    }
1025 1025
#endif
1026 1026

  
1027
    if (req->lun || buf[1] >> 5) {
1027
    if (req->lun) {
1028 1028
        /* Only LUN 0 supported.  */
1029
        DPRINTF("Unimplemented LUN %d\n", req->lun ? req->lun : buf[1] >> 5);
1029
        DPRINTF("Unimplemented LUN %d\n", req->lun);
1030 1030
        if (command != REQUEST_SENSE && command != INQUIRY) {
1031 1031
            scsi_command_complete(r, CHECK_CONDITION,
1032 1032
                                  SENSE_CODE(LUN_NOT_SUPPORTED));

Also available in: Unified diff