Revision 6a84cb1f
b/hw/scsi-disk.c | ||
---|---|---|
1515 | 1515 |
DriveInfo *dinfo; |
1516 | 1516 |
|
1517 | 1517 |
if (!s->qdev.conf.bs) { |
1518 |
error_report("scsi-disk: drive property not set");
|
|
1518 |
error_report("drive property not set"); |
|
1519 | 1519 |
return -1; |
1520 | 1520 |
} |
1521 | 1521 |
|
... | ... | |
1537 | 1537 |
} |
1538 | 1538 |
|
1539 | 1539 |
if (bdrv_is_sg(s->qdev.conf.bs)) { |
1540 |
error_report("scsi-disk: unwanted /dev/sg*");
|
|
1540 |
error_report("unwanted /dev/sg*"); |
|
1541 | 1541 |
return -1; |
1542 | 1542 |
} |
1543 | 1543 |
|
b/hw/scsi-generic.c | ||
---|---|---|
374 | 374 |
struct sg_scsi_id scsiid; |
375 | 375 |
|
376 | 376 |
if (!s->conf.bs) { |
377 |
error_report("scsi-generic: drive property not set");
|
|
377 |
error_report("drive property not set"); |
|
378 | 378 |
return -1; |
379 | 379 |
} |
380 | 380 |
|
381 | 381 |
/* check we are really using a /dev/sg* file */ |
382 | 382 |
if (!bdrv_is_sg(s->conf.bs)) { |
383 |
error_report("scsi-generic: not /dev/sg*");
|
|
383 |
error_report("not /dev/sg*"); |
|
384 | 384 |
return -1; |
385 | 385 |
} |
386 | 386 |
|
... | ... | |
396 | 396 |
/* check we are using a driver managing SG_IO (version 3 and after */ |
397 | 397 |
if (bdrv_ioctl(s->conf.bs, SG_GET_VERSION_NUM, &sg_version) < 0 || |
398 | 398 |
sg_version < 30000) { |
399 |
error_report("scsi-generic: scsi generic interface too old");
|
|
399 |
error_report("scsi generic interface too old"); |
|
400 | 400 |
return -1; |
401 | 401 |
} |
402 | 402 |
|
403 | 403 |
/* get LUN of the /dev/sg? */ |
404 | 404 |
if (bdrv_ioctl(s->conf.bs, SG_GET_SCSI_ID, &scsiid)) { |
405 |
error_report("scsi-generic: SG_GET_SCSI_ID ioctl failed");
|
|
405 |
error_report("SG_GET_SCSI_ID ioctl failed"); |
|
406 | 406 |
return -1; |
407 | 407 |
} |
408 | 408 |
|
b/hw/usb-msd.c | ||
---|---|---|
517 | 517 |
DriveInfo *dinfo; |
518 | 518 |
|
519 | 519 |
if (!bs) { |
520 |
error_report("usb-msd: drive property not set");
|
|
520 |
error_report("drive property not set"); |
|
521 | 521 |
return -1; |
522 | 522 |
} |
523 | 523 |
|
b/hw/virtio-blk.c | ||
---|---|---|
569 | 569 |
DriveInfo *dinfo; |
570 | 570 |
|
571 | 571 |
if (!conf->bs) { |
572 |
error_report("virtio-blk-pci: drive property not set");
|
|
572 |
error_report("drive property not set"); |
|
573 | 573 |
return NULL; |
574 | 574 |
} |
575 | 575 |
if (!bdrv_is_inserted(conf->bs)) { |
Also available in: Unified diff