static const char *bdrv_get_parent_name(const BlockDriverState *bs)

{

    BdrvChild *c;

    const char *name;



    /* If multiple parents have a name, just pick the first one. */

    QLIST_FOREACH(c, &bs->parents, next_parent) {

        if (c->role->get_name) {

            name = c->role->get_name(c);

            if (name && *name) {

                return name;

            }

        }

    }



    return NULL;

}

static const char *bdrv_get_parent_name(const BlockDriverState *bs)

{

    BdrvChild *c;

    const char *name;



    

    QLIST_FOREACH(c, &bs->parents, next_parent) {

        if (c->role->get_name) {

            name = c->role->get_name(c);

            if (name && *name) {

                return name;

            }

        }

    }



    return NULL;

}

static const char *FUNC_0(const BlockDriverState *VAR_0)

{

    BdrvChild *c;

    const char *VAR_1;



    

    QLIST_FOREACH(c, &VAR_0->parents, next_parent) {

        if (c->role->get_name) {

            VAR_1 = c->role->get_name(c);

            if (VAR_1 && *VAR_1) {

                return VAR_1;

            }

        }

    }



    return NULL;

}

static const char *FUNC_0(const BlockDriverState *VAR_0)
{ BdrvChild *c; const char *VAR_1; QLIST_FOREACH(c, &VAR_0->parents, next_parent) { if (c->role->get_name) { VAR_1 = c->role->get_name(c); if (VAR_1 && *VAR_1) { return VAR_1; } } } return NULL; }