static int local_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)

{

    char *buffer;

    int ret = -1;

    char *path = fs_path->data;



    if (fs_ctx->export_flags & V9FS_SM_MAPPED) {

        buffer = rpath(fs_ctx, path);

        ret = local_set_xattr(buffer, credp);

        g_free(buffer);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    } else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        buffer = rpath(fs_ctx, path);

        ret = chmod(buffer, credp->fc_mode);

        g_free(buffer);

    }

    return ret;

}

static int local_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)

{

    char *buffer;

    int ret = -1;

    char *path = fs_path->data;



    if (fs_ctx->export_flags & V9FS_SM_MAPPED) {

        buffer = rpath(fs_ctx, path);

        ret = local_set_xattr(buffer, credp);

        g_free(buffer);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    } else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        buffer = rpath(fs_ctx, path);

        ret = chmod(buffer, credp->fc_mode);

        g_free(buffer);

    }

    return ret;

}

    char *buffer;     char *path = fs_path->data;         buffer = rpath(fs_ctx, path);         ret = local_set_xattr(buffer, credp);         g_free(buffer);         return local_set_mapped_file_attr(fs_ctx, path, credp);     } else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||                (fs_ctx->export_flags & V9FS_SM_NONE)) {         buffer = rpath(fs_ctx, path);         ret = chmod(buffer, credp->fc_mode);         g_free(buffer);
static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)

{

    char *VAR_3;

    int VAR_4 = -1;

    char *VAR_5 = VAR_1->data;



    if (VAR_0->export_flags & V9FS_SM_MAPPED) {

        VAR_3 = rpath(VAR_0, VAR_5);

        VAR_4 = local_set_xattr(VAR_3, VAR_2);

        g_free(VAR_3);

    } else if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(VAR_0, VAR_5, VAR_2);

    } else if ((VAR_0->export_flags & V9FS_SM_PASSTHROUGH) ||

               (VAR_0->export_flags & V9FS_SM_NONE)) {

        VAR_3 = rpath(VAR_0, VAR_5);

        VAR_4 = chmod(VAR_3, VAR_2->fc_mode);

        g_free(VAR_3);

    }

    return VAR_4;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)
{ char *VAR_3; int VAR_4 = -1; char *VAR_5 = VAR_1->data; if (VAR_0->export_flags & V9FS_SM_MAPPED) { VAR_3 = rpath(VAR_0, VAR_5); VAR_4 = local_set_xattr(VAR_3, VAR_2); g_free(VAR_3); } else if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) { return local_set_mapped_file_attr(VAR_0, VAR_5, VAR_2); } else if ((VAR_0->export_flags & V9FS_SM_PASSTHROUGH) || (VAR_0->export_flags & V9FS_SM_NONE)) { VAR_3 = rpath(VAR_0, VAR_5); VAR_4 = chmod(VAR_3, VAR_2->fc_mode); g_free(VAR_3); } return VAR_4; }