int qdev_prop_set_drive(DeviceState *dev, const char *name,

                        BlockDriverState *value)

{

    Error *err = NULL;

    const char *bdrv_name = value ? bdrv_get_device_name(value) : "";

    object_property_set_str(OBJECT(dev), bdrv_name,

                            name, &err);

    if (err) {

        qerror_report_err(err);

        error_free(err);

        return -1;

    }

    return 0;

}

int qdev_prop_set_drive(DeviceState *dev, const char *name,

                        BlockDriverState *value)

{

    Error *err = NULL;

    const char *bdrv_name = value ? bdrv_get_device_name(value) : "";

    object_property_set_str(OBJECT(dev), bdrv_name,

                            name, &err);

    if (err) {

        qerror_report_err(err);

        error_free(err);

        return -1;

    }

    return 0;

}

int FUNC_0(DeviceState *VAR_0, const char *VAR_1,

                        BlockDriverState *VAR_2)

{

    Error *err = NULL;

    const char *VAR_3 = VAR_2 ? bdrv_get_device_name(VAR_2) : "";

    object_property_set_str(OBJECT(VAR_0), VAR_3,

                            VAR_1, &err);

    if (err) {

        qerror_report_err(err);

        error_free(err);

        return -1;

    }

    return 0;

}

int FUNC_0(DeviceState *VAR_0, const char *VAR_1,
BlockDriverState *VAR_2)
{ Error *err = NULL; const char *VAR_3 = VAR_2 ? bdrv_get_device_name(VAR_2) : ""; object_property_set_str(OBJECT(VAR_0), VAR_3,
VAR_1, &err); if (err) { qerror_report_err(err); error_free(err); return -1; } return 0; }