* Channel interface *
* ----------------------------------------------------------- */
-/**
- * Query the file descriptor of the channel
- *
- * @param ch the channel
- * @return the file descriptor passed to fuse_chan_new()
- */
-int fuse_chan_fd(struct fuse_chan *ch);
-
/**
* Obtain counted reference to the channel
*
}
fcntl(clonefd, F_SETFD, FD_CLOEXEC);
- masterfd = fuse_chan_fd(mt->prevch);
+ masterfd = mt->prevch->fd;
res = ioctl(clonefd, FUSE_DEV_IOC_CLONE, &masterfd);
if (res == -1) {
fprintf(stderr, "fuse: failed to clone device fd: %s\n",
void fuse_chan_close(struct fuse_chan *ch)
{
- int fd = fuse_chan_fd(ch);
+ int fd = ch->fd;
if (fd != -1)
- close(fd);
+ close(fd);
}
}
}
- ssize_t res = writev(fuse_chan_fd(ch), iov, count);
+ ssize_t res = writev(ch->fd, iov, count);
int err = errno;
if (res == -1) {
splice_flags |= SPLICE_F_MOVE;
res = splice(llp->pipe[0], NULL,
- fuse_chan_fd(ch), NULL, out->len, splice_flags);
+ ch->fd, NULL, out->len, splice_flags);
if (res == -1) {
res = -errno;
perror("fuse: splice from pipe");
goto fallback;
}
- res = splice(fuse_chan_fd(ch), NULL, llp->pipe[1], NULL, bufsize, 0);
+ res = splice(ch->fd, NULL, llp->pipe[1], NULL, bufsize, 0);
err = errno;
if (fuse_session_exited(se))
}
restart:
- res = read(fuse_chan_fd(ch), buf->mem, f->bufsize);
+ res = read(ch->fd, buf->mem, f->bufsize);
err = errno;
if (fuse_session_exited(se))