static ssize_t local_readlink(FsContext *fs_ctx, V9fsPath *fs_path,

                              char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    char *buffer;

    char *path = fs_path->data;



    if ((fs_ctx->export_flags & V9FS_SM_MAPPED) ||

        (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {

        int fd;

        buffer = rpath(fs_ctx, path);

        fd = open(buffer, O_RDONLY | O_NOFOLLOW);

        g_free(buffer);

        if (fd == -1) {

            return -1;

        }

        do {

            tsize = read(fd, (void *)buf, bufsz);

        } while (tsize == -1 && errno == EINTR);

        close(fd);

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        buffer = rpath(fs_ctx, path);

        tsize = readlink(buffer, buf, bufsz);

        g_free(buffer);

    }

    return tsize;

}

static ssize_t local_readlink(FsContext *fs_ctx, V9fsPath *fs_path,

                              char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    char *buffer;

    char *path = fs_path->data;



    if ((fs_ctx->export_flags & V9FS_SM_MAPPED) ||

        (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {

        int fd;

        buffer = rpath(fs_ctx, path);

        fd = open(buffer, O_RDONLY | O_NOFOLLOW);

        g_free(buffer);

        if (fd == -1) {

            return -1;

        }

        do {

            tsize = read(fd, (void *)buf, bufsz);

        } while (tsize == -1 && errno == EINTR);

        close(fd);

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        buffer = rpath(fs_ctx, path);

        tsize = readlink(buffer, buf, bufsz);

        g_free(buffer);

    }

    return tsize;

}

    char *buffer;     char *path = fs_path->data;         buffer = rpath(fs_ctx, path);         fd = open(buffer, O_RDONLY | O_NOFOLLOW);         g_free(buffer);         close(fd);         buffer = rpath(fs_ctx, path);         tsize = readlink(buffer, buf, bufsz);         g_free(buffer);
static ssize_t FUNC_0(FsContext *fs_ctx, V9fsPath *fs_path,

                              char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    char *VAR_0;

    char *VAR_1 = fs_path->data;



    if ((fs_ctx->export_flags & V9FS_SM_MAPPED) ||

        (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {

        int VAR_2;

        VAR_0 = rpath(fs_ctx, VAR_1);

        VAR_2 = open(VAR_0, O_RDONLY | O_NOFOLLOW);

        g_free(VAR_0);

        if (VAR_2 == -1) {

            return -1;

        }

        do {

            tsize = read(VAR_2, (void *)buf, bufsz);

        } while (tsize == -1 && errno == EINTR);

        close(VAR_2);

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        VAR_0 = rpath(fs_ctx, VAR_1);

        tsize = readlink(VAR_0, buf, bufsz);

        g_free(VAR_0);

    }

    return tsize;

}

static ssize_t FUNC_0(FsContext *fs_ctx, V9fsPath *fs_path,
char *buf, size_t bufsz)
{ ssize_t tsize = -1; char *VAR_0; char *VAR_1 = fs_path->data; if ((fs_ctx->export_flags & V9FS_SM_MAPPED) ||
(fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) { int VAR_2; VAR_0 = rpath(fs_ctx, VAR_1); VAR_2 = open(VAR_0, O_RDONLY | O_NOFOLLOW); g_free(VAR_0); if (VAR_2 == -1) { return -1; } do { tsize = read(VAR_2, (void *)buf, bufsz); } while (tsize == -1 && errno == EINTR); close(VAR_2); } else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) || (fs_ctx->export_flags & V9FS_SM_NONE)) { VAR_0 = rpath(fs_ctx, VAR_1); tsize = readlink(VAR_0, buf, bufsz); g_free(VAR_0); } return tsize; }