diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2002-01-06 21:44:16 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2002-01-06 21:44:16 +0000 |
commit | 6ebe234cc8160d7540add80a75cc7772e08236f5 (patch) | |
tree | fc2a93821f0f758592a7f893de8b79104b3a728e | |
parent | 019b4e949d99a38a46082ec390e5162a394237aa (diff) | |
download | libfuse-6ebe234cc8160d7540add80a75cc7772e08236f5.tar.gz |
minor changes
-rw-r--r-- | kernel/util.c | 3 | ||||
-rw-r--r-- | lib/fuse.c | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/kernel/util.c b/kernel/util.c index beed271..e2679a0 100644 --- a/kernel/util.c +++ b/kernel/util.c @@ -12,7 +12,10 @@ 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; @@ -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); |