Lines Matching defs:bdrv
65 BlockDriverState *bdrv;
213 r->aiocb = bdrv_aio_readv(s->bdrv, r->sector, &r->qiov, n,
223 BlockErrorAction action = bdrv_get_on_error(r->dev->bdrv, 0);
278 r->aiocb = bdrv_aio_writev(s->bdrv, r->sector, &r->qiov, n,
422 if (!bdrv_is_inserted(s->bdrv))
468 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
499 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
517 int id_len = strlen(bdrv_get_device_name(s->bdrv));
524 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
540 bdrv_get_device_name(s->bdrv), id_len);
580 } else if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
621 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
632 bdrv_get_geometry_hint(s->bdrv, &cylinders, &heads, &secs);
666 bdrv_get_geometry_hint(s->bdrv, &cylinders, &heads, &secs);
703 && (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM)) {
714 p[6] = 0x2d | (bdrv_is_locked(s->bdrv)? 2 : 0);
740 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM &&
743 bdrv_eject(s->bdrv, !(buf[4] & 1));
747 bdrv_set_locked(s->bdrv, buf[4] & 1);
753 bdrv_get_geometry(s->bdrv, &nb_sectors);
799 bdrv_flush(s->bdrv);
808 bdrv_get_geometry(s->bdrv, &nb_sectors);
862 bdrv_get_geometry(s->bdrv, &nb_sectors);
930 SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, int tcq,
938 s->bdrv = bdrv;
942 if (bdrv_get_type_hint(s->bdrv) == BDRV_TYPE_CDROM) {
947 bdrv_get_geometry(s->bdrv, &nb_sectors);
953 strncpy(s->drive_serial_str, drive_get_serial(s->bdrv),