aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-07-21 07:59:37 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-07-21 07:59:37 +0000
commit9b813af8631729cf7f626f0cbac08863bb315863 (patch)
tree1ccd7493b978e83e85f27063d88045dbdddec7bb /example
parente2aa2e243d729e29ad67f1b30aa3392ca9a9cdb2 (diff)
fixes
Diffstat (limited to 'example')
-rw-r--r--example/hello_ll.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/example/hello_ll.c b/example/hello_ll.c
index 2589836..9f70865 100644
--- a/example/hello_ll.c
+++ b/example/hello_ll.c
@@ -27,13 +27,13 @@ static int hello_stat(fuse_ino_t ino, struct stat *stbuf)
stbuf->st_mode = S_IFDIR | 0755;
stbuf->st_nlink = 2;
break;
-
+
case 2:
stbuf->st_mode = S_IFREG | 0444;
stbuf->st_nlink = 1;
stbuf->st_size = strlen(hello_str);
break;
-
+
default:
return -1;
}
@@ -63,7 +63,7 @@ static void hello_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name)
e.attr_timeout = 1.0;
e.entry_timeout = 1.0;
hello_stat(e.ino, &e.attr);
-
+
fuse_reply_entry(req, &e);
}
}
@@ -89,7 +89,6 @@ static void dirbuf_add(struct dirbuf *b, const char *name, fuse_ino_t ino)
static int reply_buf_limited(fuse_req_t req, const char *buf, size_t bufsize,
off_t off, size_t maxsize)
{
-
if (off < bufsize)
return fuse_reply_buf(req, buf + off, min(bufsize - off, maxsize));
else
@@ -105,7 +104,7 @@ static void hello_ll_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
fuse_reply_err(req, ENOTDIR);
else {
struct dirbuf b;
-
+
memset(&b, 0, sizeof(b));
dirbuf_add(&b, ".", 1);
dirbuf_add(&b, "..", 1);