int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,

                            Error **errp)

{

    int ret;



    ret = bdrv_child_check_perm(c, perm, shared, errp);

    if (ret < 0) {

        bdrv_child_abort_perm_update(c);

        return ret;

    }



    bdrv_child_set_perm(c, perm, shared);



    return 0;

}

int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,

                            Error **errp)

{

    int ret;



    ret = bdrv_child_check_perm(c, perm, shared, errp);

    if (ret < 0) {

        bdrv_child_abort_perm_update(c);

        return ret;

    }



    bdrv_child_set_perm(c, perm, shared);



    return 0;

}

int FUNC_0(BdrvChild *VAR_0, uint64_t VAR_1, uint64_t VAR_2,

                            Error **VAR_3)

{

    int VAR_4;



    VAR_4 = bdrv_child_check_perm(VAR_0, VAR_1, VAR_2, VAR_3);

    if (VAR_4 < 0) {

        bdrv_child_abort_perm_update(VAR_0);

        return VAR_4;

    }



    bdrv_child_set_perm(VAR_0, VAR_1, VAR_2);



    return 0;

}

int FUNC_0(BdrvChild *VAR_0, uint64_t VAR_1, uint64_t VAR_2,
Error **VAR_3)
{ int VAR_4; VAR_4 = bdrv_child_check_perm(VAR_0, VAR_1, VAR_2, VAR_3); if (VAR_4 < 0) { bdrv_child_abort_perm_update(VAR_0); return VAR_4; } bdrv_child_set_perm(VAR_0, VAR_1, VAR_2); return 0; }