#endif
int i = find_source( off );
if ( i < 0 ) {
- return ( off == sources.size )? 0 : -ENOENT;
+ return ( off == sources.size )? rr : -ENOENT;
}
if ( sources.array[i].fd < 0 ) {
return -ENOENT;
return rr;
}
+/**
+ * Poll for IO readiness.
+ */
+int fusefile_poll(const char *path, struct fuse_file_info *fi,
+ struct fuse_pollhandle *ph, unsigned *reventsp )
+{
+#if DEBUG
+ fprintf( stderr, "fusefile_poll( %s ) %p %d\n", path, ph, *reventsp );
+#endif
+ if( strcmp( path, "/" ) != 0 ) {
+ return -ENOENT;
+ }
+ if ( ph ) {
+ return fuse_notify_poll( ph );
+ }
+ return 0;
+}
+
+
/**
* Write a full block of data over the sources at the offset
*/
.chmod = fusefile_chmod,
.open = fusefile_open,
.read = fusefile_read,
+ .poll = fusefile_poll,
.write = fusefile_write,
.write_buf = fusefile_write_buf,
.destroy = fusefile_destroy,