static int v9fs_do_open2(V9fsState *s, V9fsCreateState *vs)

{

    FsCred cred;

    int flags;



    cred_init(&cred);

    cred.fc_uid = vs->fidp->uid;

    cred.fc_mode = vs->perm & 0777;

    flags = omode_to_uflags(vs->mode) | O_CREAT;



    return s->ops->open2(&s->ctx, vs->fullname.data, flags, &cred);

}

static int v9fs_do_open2(V9fsState *s, V9fsCreateState *vs)

{

    FsCred cred;

    int flags;



    cred_init(&cred);

    cred.fc_uid = vs->fidp->uid;

    cred.fc_mode = vs->perm & 0777;

    flags = omode_to_uflags(vs->mode) | O_CREAT;



    return s->ops->open2(&s->ctx, vs->fullname.data, flags, &cred);

}

static int FUNC_0(V9fsState *VAR_0, V9fsCreateState *VAR_1)

{

    FsCred cred;

    int VAR_2;



    cred_init(&cred);

    cred.fc_uid = VAR_1->fidp->uid;

    cred.fc_mode = VAR_1->perm & 0777;

    VAR_2 = omode_to_uflags(VAR_1->mode) | O_CREAT;



    return VAR_0->ops->open2(&VAR_0->ctx, VAR_1->fullname.data, VAR_2, &cred);

}

static int FUNC_0(V9fsState *VAR_0, V9fsCreateState *VAR_1)
{ FsCred cred; int VAR_2; cred_init(&cred); cred.fc_uid = VAR_1->fidp->uid; cred.fc_mode = VAR_1->perm & 0777; VAR_2 = omode_to_uflags(VAR_1->mode) | O_CREAT; return VAR_0->ops->open2(&VAR_0->ctx, VAR_1->fullname.data, VAR_2, &cred); }