aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/passthrough_ll.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index 8a5ac2e..dce8355 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -315,7 +315,7 @@ static struct lo_inode *create_new_inode(int fd, struct fuse_entry_param *e, str
{
struct lo_inode *inode = NULL;
struct lo_inode *prev, *next;
-
+
inode = calloc(1, sizeof(struct lo_inode));
if (!inode)
return NULL;
@@ -352,7 +352,7 @@ static int fill_entry_param_new_inode(fuse_req_t req, fuse_ino_t parent, int fd,
e->ino = (uintptr_t) create_new_inode(dup(fd), e, lo);
if (lo_debug(req))
- fuse_log(FUSE_LOG_DEBUG, " %lli/%lli -> %lli\n",
+ fuse_log(FUSE_LOG_DEBUG, " %lli/%d -> %lli\n",
(unsigned long long) parent, fd, (unsigned long long) e->ino);
return 0;
@@ -712,7 +712,7 @@ static void lo_do_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
err = errno;
goto error;
} else { // End of stream
- break;
+ break;
}
}
}
@@ -744,11 +744,11 @@ static void lo_do_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
&st, nextoff);
}
if (entsize > rem) {
- if (entry_ino != 0)
+ if (entry_ino != 0)
lo_forget_one(req, entry_ino, 1);
break;
}
-
+
p += entsize;
rem -= entsize;
@@ -816,9 +816,9 @@ static void lo_tmpfile(fuse_req_t req, fuse_ino_t parent,
/* parallel_direct_writes feature depends on direct_io features.
To make parallel_direct_writes valid, need set fi->direct_io
in current function. */
- fi->parallel_direct_writes = 1;
-
- err = fill_entry_param_new_inode(req, parent, fd, &e);
+ fi->parallel_direct_writes = 1;
+
+ err = fill_entry_param_new_inode(req, parent, fd, &e);
if (err)
fuse_reply_err(req, err);
else
@@ -981,8 +981,8 @@ static void lo_write_buf(fuse_req_t req, fuse_ino_t ino,
out_buf.buf[0].pos = off;
if (lo_debug(req))
- fuse_log(FUSE_LOG_DEBUG, "lo_write(ino=%" PRIu64 ", size=%zd, off=%lu)\n",
- ino, out_buf.buf[0].size, (unsigned long) off);
+ fuse_log(FUSE_LOG_DEBUG, "lo_write(ino=%" PRIu64 ", size=%zd, off=%jd)\n",
+ ino, out_buf.buf[0].size, (intmax_t) off);
res = fuse_buf_copy(&out_buf, in_buf, 0);
if(res < 0)
@@ -1187,10 +1187,12 @@ static void lo_copy_file_range(fuse_req_t req, fuse_ino_t ino_in, off_t off_in,
ssize_t res;
if (lo_debug(req))
- fuse_log(FUSE_LOG_DEBUG, "lo_copy_file_range(ino=%" PRIu64 "/fd=%lu, "
- "off=%lu, ino=%" PRIu64 "/fd=%lu, "
- "off=%lu, size=%zd, flags=0x%x)\n",
- ino_in, fi_in->fh, off_in, ino_out, fi_out->fh, off_out,
+ fuse_log(FUSE_LOG_DEBUG,
+ "%s(ino=%lld fd=%lld off=%jd ino=%lld fd=%lld off=%jd, size=%zd, flags=0x%x)\n",
+ __func__, (unsigned long long)ino_in,
+ (unsigned long long)fi_in->fh,
+ (intmax_t) off_in, (unsigned long long)ino_out,
+ (unsigned long long)fi_out->fh, (intmax_t) off_out,
len, flags);
res = copy_file_range(fi_in->fh, &off_in, fi_out->fh, &off_out, len,