#if DEBUG
print_source( &sources.array[i] );
#endif
+ times.atime = time( 0 );
size_t b = off - sources.array[i].start + sources.array[i].from;
size_t n = sources.array[i].to - b;
if ( n > size ) {
off += r;
size -= r;
}
- times.atime = time( 0 );
return rr;
}
return -EIO;
}
+void *fusefile_init(struct fuse_conn_info *fci) {
+#if DEBUG
+ fprintf( stderr, "fusefile_init( %d, %d )\n", fci->async_read, fci->want );
+#endif
+ // Disable asynchronous reading
+ fci->async_read = 0;
+ fci->want &= ~FUSE_CAP_ASYNC_READ;
+#if DEBUG
+ fprintf( stderr, "fusefile_init( %d, %d )\n", fci->async_read, fci->want );
+#endif
+ return 0;
+}
+
static struct fuse_operations fusefile_oper = {
.getattr = fusefile_getattr,
.chmod = fusefile_chmod,
.truncate = fusefile_truncate,
//.truncate = fusefile_truncate,
//.release = fusefile_release,
- //void *(*init) (struct fuse_conn_info *conn);
+ .init = fusefile_init,
};
static void usage() {