static int blkverify_open(BlockDriverState *bs, QDict *options, int flags,

                          Error **errp)

{

    BDRVBlkverifyState *s = bs->opaque;

    QemuOpts *opts;

    Error *local_err = NULL;

    int ret;



    opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);

    qemu_opts_absorb_qdict(opts, options, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        ret = -EINVAL;

        goto fail;




    /* Open the raw file */

    bs->file = bdrv_open_child(qemu_opt_get(opts, "x-raw"), options, "raw",

                               bs, &child_file, false, &local_err);

    if (local_err) {

        ret = -EINVAL;

        error_propagate(errp, local_err);

        goto fail;




    /* Open the test file */

    s->test_file = bdrv_open_child(qemu_opt_get(opts, "x-image"), options,

                                   "test", bs, &child_format, false,

                                   &local_err);

    if (local_err) {

        ret = -EINVAL;

        error_propagate(errp, local_err);

        goto fail;




    ret = 0;

fail:




    qemu_opts_del(opts);

    return ret;

static int blkverify_open(BlockDriverState *bs, QDict *options, int flags,

                          Error **errp)

{

    BDRVBlkverifyState *s = bs->opaque;

    QemuOpts *opts;

    Error *local_err = NULL;

    int ret;



    opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);

    qemu_opts_absorb_qdict(opts, options, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        ret = -EINVAL;

        goto fail;




    

    bs->file = bdrv_open_child(qemu_opt_get(opts, "x-raw"), options, "raw",

                               bs, &child_file, false, &local_err);

    if (local_err) {

        ret = -EINVAL;

        error_propagate(errp, local_err);

        goto fail;




    

    s->test_file = bdrv_open_child(qemu_opt_get(opts, "x-image"), options,

                                   "test", bs, &child_format, false,

                                   &local_err);

    if (local_err) {

        ret = -EINVAL;

        error_propagate(errp, local_err);

        goto fail;




    ret = 0;

fail:




    qemu_opts_del(opts);

    return ret;

static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,

                          Error **VAR_3)

{

    BDRVBlkverifyState *s = VAR_0->opaque;

    QemuOpts *opts;

    Error *local_err = NULL;

    int VAR_4;



    opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);

    qemu_opts_absorb_qdict(opts, VAR_1, &local_err);

    if (local_err) {

        error_propagate(VAR_3, local_err);

        VAR_4 = -EINVAL;

        goto fail;




    

    VAR_0->file = bdrv_open_child(qemu_opt_get(opts, "x-raw"), VAR_1, "raw",

                               VAR_0, &child_file, false, &local_err);

    if (local_err) {

        VAR_4 = -EINVAL;

        error_propagate(VAR_3, local_err);

        goto fail;




    

    s->test_file = bdrv_open_child(qemu_opt_get(opts, "x-image"), VAR_1,

                                   "test", VAR_0, &child_format, false,

                                   &local_err);

    if (local_err) {

        VAR_4 = -EINVAL;

        error_propagate(VAR_3, local_err);

        goto fail;




    VAR_4 = 0;

fail:




    qemu_opts_del(opts);

    return VAR_4;

static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,
Error **VAR_3)
{ BDRVBlkverifyState *s = VAR_0->opaque; QemuOpts *opts; Error *local_err = NULL; int VAR_4; opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, VAR_1, &local_err); if (local_err) { error_propagate(VAR_3, local_err); VAR_4 = -EINVAL; goto fail; VAR_0->file = bdrv_open_child(qemu_opt_get(opts, "x-raw"), VAR_1, "raw",
VAR_0, &child_file, false, &local_err); if (local_err) { VAR_4 = -EINVAL; error_propagate(VAR_3, local_err); goto fail; s->test_file = bdrv_open_child(qemu_opt_get(opts, "x-image"), VAR_1,
"test", VAR_0, &child_format, false,
&local_err); if (local_err) { VAR_4 = -EINVAL; error_propagate(VAR_3, local_err); goto fail; VAR_4 = 0; fail:
qemu_opts_del(opts); return VAR_4;