Revision 0fc5c15a hw/scsi-disk.c

b/hw/scsi-disk.c
53 53
static void scsi_command_complete(SCSIDevice *s, int sense)
54 54
{
55 55
    s->sense = sense;
56
    s->completion(s->opaque, s->tag, sense != SENSE_NO_SENSE);
56
    s->completion(s->opaque, s->tag, sense);
57 57
}
58 58

  
59 59
/* Read data from a scsi device.  Returns nonzero on failure.  */
......
175 175
   (eg. disk reads), negative for transfers to the device (eg. disk writes),
176 176
   and zero if the command does not transfer any data.  */
177 177

  
178
int32_t scsi_send_command(SCSIDevice *s, uint32_t tag, uint8_t *buf)
178
int32_t scsi_send_command(SCSIDevice *s, uint32_t tag, uint8_t *buf, int lun)
179 179
{
180 180
    int64_t nb_sectors;
181 181
    uint32_t lba;
......
225 225
        printf("\n");
226 226
    }
227 227
#endif
228
    if (buf[1] >> 5) {
228
    if (lun || buf[1] >> 5) {
229 229
        /* Only LUN 0 supported.  */
230
        DPRINTF("Unimplemented LUN %d\n", lun ? lun : buf[1] >> 5);
230 231
        goto fail;
231 232
    }
232 233
    switch (s->command) {

Also available in: Unified diff