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

                              char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    char buffer[PATH_MAX];

    char *path = fs_path->data;



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

        (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {

        int fd;

        fd = open(rpath(fs_ctx, path, buffer), O_RDONLY | O_NOFOLLOW);

        if (fd == -1) {

            return -1;

        }

        do {

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

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

        close(fd);

        return tsize;

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        tsize = readlink(rpath(fs_ctx, path, buffer), buf, bufsz);

    }

    return tsize;

}

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

                              char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    char buffer[PATH_MAX];

    char *path = fs_path->data;



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

        (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {

        int fd;

        fd = open(rpath(fs_ctx, path, buffer), O_RDONLY | O_NOFOLLOW);

        if (fd == -1) {

            return -1;

        }

        do {

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

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

        close(fd);

        return tsize;

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        tsize = readlink(rpath(fs_ctx, path, buffer), buf, bufsz);

    }

    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[PATH_MAX];

    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_2 = open(rpath(fs_ctx, VAR_1, VAR_0), O_RDONLY | O_NOFOLLOW);

        if (VAR_2 == -1) {

            return -1;

        }

        do {

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

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

        close(VAR_2);

        return tsize;

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

               (fs_ctx->export_flags & V9FS_SM_NONE)) {

        tsize = readlink(rpath(fs_ctx, VAR_1, VAR_0), buf, bufsz);

    }

    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[PATH_MAX]; 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_2 = open(rpath(fs_ctx, VAR_1, VAR_0), O_RDONLY | O_NOFOLLOW); if (VAR_2 == -1) { return -1; } do { tsize = read(VAR_2, (void *)buf, bufsz); } while (tsize == -1 && errno == EINTR); close(VAR_2); return tsize; } else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) || (fs_ctx->export_flags & V9FS_SM_NONE)) { tsize = readlink(rpath(fs_ctx, VAR_1, VAR_0), buf, bufsz); } return tsize; }