| FUSE: Filesystem in Userspace |
| Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> |
| This program can be distributed under the terms of the GNU LGPLv2. |
| #include "fuse_lowlevel.h" |
| int fuse_session_loop(struct fuse_session *se) |
| struct fuse_chan *ch = fuse_session_next_chan(se, NULL); |
| size_t bufsize = fuse_chan_bufsize(ch); |
| char *buf = (char *) malloc(bufsize); |
| fprintf(stderr, "fuse: failed to allocate read buffer\n"); |
| while (!fuse_session_exited(se)) { |
| struct fuse_chan *tmpch = ch; |
| res = fuse_session_receive_buf(se, &fbuf, &tmpch); |
| fuse_session_process_buf(se, &fbuf, tmpch); |