minor changes
authorMiklos Szeredi <miklos@szeredi.hu>
Sun, 6 Jan 2002 21:44:16 +0000 (21:44 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Sun, 6 Jan 2002 21:44:16 +0000 (21:44 +0000)
kernel/util.c
lib/fuse.c

index beed2719982b59921b3dd7d35ada0f67893cb1be..e2679a01b9234b30e1cf825d2046b1ab8021daf2 100644 (file)
 
 MODULE_AUTHOR("Miklos Szeredi <mszeredi@inf.bme.hu>");
 MODULE_DESCRIPTION("Filesystem in Userspace");
+
+#ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
+#endif
 
 spinlock_t fuse_lock = SPIN_LOCK_UNLOCKED;
 
index 45a0dc5a40dc5a6053d8b9a12cd4846342470177..98bab3f4cd3fc73b8af51f00a6aeb6ad5107df5d 100644 (file)
@@ -387,6 +387,10 @@ static void do_lookup(struct fuse *f, struct fuse_in_header *in, char *name)
     res = -ENOENT;
     path = get_path_name(f, in->ino, name);
     if(path != NULL) {
+        if(f->flags & FUSE_DEBUG) {
+            printf("LOOKUP %s\n", path);
+            fflush(stdout);
+        }
         res = -ENOSYS;
         if(f->op.getattr)
             res = f->op.getattr(path, &buf);
@@ -395,6 +399,10 @@ static void do_lookup(struct fuse *f, struct fuse_in_header *in, char *name)
     if(res == 0) {
         convert_stat(&buf, &arg.attr);
         arg.ino = find_node(f, in->ino, name, &arg.attr, in->unique);
+        if(f->flags & FUSE_DEBUG) {
+            printf("   LOOKUP: %li\n", arg.ino);
+            fflush(stdout);
+        }
     }
     send_reply(f, in, res, &arg, sizeof(arg));
 }
@@ -724,6 +732,11 @@ static void do_read(struct fuse *f, struct fuse_in_header *in,
     res = -ENOENT;
     path = get_path(f, in->ino);
     if(path != NULL) {
+        if(f->flags & FUSE_DEBUG) {
+            printf("READ %u bytes from %llu\n", arg->size, arg->offset);
+            fflush(stdout);
+        }
+
         res = -ENOSYS;
         if(f->op.read)
             res = f->op.read(path, buf, arg->size, arg->offset);
@@ -734,6 +747,10 @@ static void do_read(struct fuse *f, struct fuse_in_header *in,
     if(res > 0) {
         size = res;
         res = 0;
+        if(f->flags & FUSE_DEBUG) {
+            printf("   READ %u bytes\n", size);
+            fflush(stdout);
+        }
     }
     out->unique = in->unique;
     out->error = res;
@@ -752,6 +769,11 @@ static void do_write(struct fuse *f, struct fuse_in_header *in,
     res = -ENOENT;
     path = get_path(f, in->ino);
     if(path != NULL) {
+        if(f->flags & FUSE_DEBUG) {
+            printf("WRITE %u bytes to %llu\n", arg->size, arg->offset);
+            fflush(stdout);
+        }
+
         res = -ENOSYS;
         if(f->op.write)
             res = f->op.write(path, arg->buf, arg->size, arg->offset);