void qmp_x_blockdev_insert_medium(const char *device, const char *node_name,

                                  Error **errp)

{

    BlockDriverState *bs;



    bs = bdrv_find_node(node_name);

    if (!bs) {

        error_setg(errp, "Node '%s' not found", node_name);

        return;

    }



    if (bs->blk) {

        error_setg(errp, "Node '%s' is already in use by '%s'", node_name,

                   blk_name(bs->blk));

        return;

    }



    qmp_blockdev_insert_anon_medium(device, bs, errp);

}

void qmp_x_blockdev_insert_medium(const char *device, const char *node_name,

                                  Error **errp)

{

    BlockDriverState *bs;



    bs = bdrv_find_node(node_name);

    if (!bs) {

        error_setg(errp, "Node '%s' not found", node_name);

        return;

    }



    if (bs->blk) {

        error_setg(errp, "Node '%s' is already in use by '%s'", node_name,

                   blk_name(bs->blk));

        return;

    }



    qmp_blockdev_insert_anon_medium(device, bs, errp);

}

void FUNC_0(const char *VAR_0, const char *VAR_1,

                                  Error **VAR_2)

{

    BlockDriverState *bs;



    bs = bdrv_find_node(VAR_1);

    if (!bs) {

        error_setg(VAR_2, "Node '%s' not found", VAR_1);

        return;

    }



    if (bs->blk) {

        error_setg(VAR_2, "Node '%s' is already in use by '%s'", VAR_1,

                   blk_name(bs->blk));

        return;

    }



    qmp_blockdev_insert_anon_medium(VAR_0, bs, VAR_2);

}

void FUNC_0(const char *VAR_0, const char *VAR_1,
Error **VAR_2)
{ BlockDriverState *bs; bs = bdrv_find_node(VAR_1); if (!bs) { error_setg(VAR_2, "Node '%s' not found", VAR_1); return; } if (bs->blk) { error_setg(VAR_2, "Node '%s' is already in use by '%s'", VAR_1,
blk_name(bs->blk)); return; } qmp_blockdev_insert_anon_medium(VAR_0, bs, VAR_2); }