static void scsi_disk_realize(SCSIDevice *dev, Error **errp)

{

    DriveInfo *dinfo;

    Error *local_err = NULL;



    if (!dev->conf.bs) {

        scsi_realize(dev, &local_err);

        assert(local_err);

        error_propagate(errp, local_err);

        return;

    }



    dinfo = drive_get_by_blockdev(dev->conf.bs);

    if (dinfo->media_cd) {

        scsi_cd_realize(dev, errp);

    } else {

        scsi_hd_realize(dev, errp);

    }

}

static void scsi_disk_realize(SCSIDevice *dev, Error **errp)

{

    DriveInfo *dinfo;

    Error *local_err = NULL;



    if (!dev->conf.bs) {

        scsi_realize(dev, &local_err);

        assert(local_err);

        error_propagate(errp, local_err);

        return;

    }



    dinfo = drive_get_by_blockdev(dev->conf.bs);

    if (dinfo->media_cd) {

        scsi_cd_realize(dev, errp);

    } else {

        scsi_hd_realize(dev, errp);

    }

}

static void FUNC_0(SCSIDevice *VAR_0, Error **VAR_1)

{

    DriveInfo *dinfo;

    Error *local_err = NULL;



    if (!VAR_0->conf.bs) {

        scsi_realize(VAR_0, &local_err);

        assert(local_err);

        error_propagate(VAR_1, local_err);

        return;

    }



    dinfo = drive_get_by_blockdev(VAR_0->conf.bs);

    if (dinfo->media_cd) {

        scsi_cd_realize(VAR_0, VAR_1);

    } else {

        scsi_hd_realize(VAR_0, VAR_1);

    }

}

static void FUNC_0(SCSIDevice *VAR_0, Error **VAR_1)
{ DriveInfo *dinfo; Error *local_err = NULL; if (!VAR_0->conf.bs) { scsi_realize(VAR_0, &local_err); assert(local_err); error_propagate(VAR_1, local_err); return; } dinfo = drive_get_by_blockdev(VAR_0->conf.bs); if (dinfo->media_cd) { scsi_cd_realize(VAR_0, VAR_1); } else { scsi_hd_realize(VAR_0, VAR_1); } }