Revision 8172539d hw/virtio-blk.c
b/hw/virtio-blk.c | ||
---|---|---|
432 | 432 |
memcpy(config, &blkcfg, s->config_size); |
433 | 433 |
} |
434 | 434 |
|
435 |
static uint32_t virtio_blk_get_features(VirtIODevice *vdev) |
|
435 |
static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
|
|
436 | 436 |
{ |
437 | 437 |
VirtIOBlock *s = to_virtio_blk(vdev); |
438 |
uint32_t features = 0; |
|
439 | 438 |
|
440 | 439 |
features |= (1 << VIRTIO_BLK_F_SEG_MAX); |
441 | 440 |
features |= (1 << VIRTIO_BLK_F_GEOMETRY); |
442 | 441 |
|
443 | 442 |
if (bdrv_enable_write_cache(s->bs)) |
444 | 443 |
features |= (1 << VIRTIO_BLK_F_WCACHE); |
445 |
#ifdef __linux__ |
|
446 |
features |= (1 << VIRTIO_BLK_F_SCSI); |
|
447 |
#endif |
|
448 | 444 |
if (strcmp(s->serial_str, "0")) |
449 | 445 |
features |= 1 << VIRTIO_BLK_F_IDENTIFY; |
450 | 446 |
|
Also available in: Unified diff