aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/Makefile1
-rw-r--r--fs/tabfs.c14
2 files changed, 9 insertions, 6 deletions
diff --git a/fs/Makefile b/fs/Makefile
index 658adb7..622c2df 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -36,3 +36,4 @@ unmount:
killall -9 tabfs || true
diskutil unmount force mnt || true
fusermount -u mnt || true
+ umount -f mnt || true
diff --git a/fs/tabfs.c b/fs/tabfs.c
index 0eab91c..1e22637 100644
--- a/fs/tabfs.c
+++ b/fs/tabfs.c
@@ -261,7 +261,7 @@ static int tabfs_open(const char *path, struct fuse_file_info *fi) {
"open", path, fi->flags);
parse_and_free_response(data, size,
- "fh: %d",
+ "fh: %llu",
&fi->fh);
return 0;
@@ -275,7 +275,7 @@ static int tabfs_read(const char *path,
char *rdata;
size_t rsize;
exchange_json(&rdata, &rsize,
- "op: %Q, path: %Q, size: %d, offset: %d, fh: %d, flags: %d",
+ "op: %Q, path: %Q, size: %d, offset: %d, fh: %llu, flags: %d",
"read", path, size, offset, fi->fh, fi->flags);
char *scan_buf; int scan_len;
@@ -298,7 +298,7 @@ static int tabfs_write(const char *path,
char *rdata;
size_t rsize;
exchange_json(&rdata, &rsize,
- "op: %Q, path: %Q, buf: %V, offset: %d, fh: %d, flags: %d",
+ "op: %Q, path: %Q, buf: %V, offset: %d, fh: %llu, flags: %d",
"write", path, data, size, offset, fi->fh, fi->flags);
int ret;
@@ -313,7 +313,7 @@ static int tabfs_release(const char *path, struct fuse_file_info *fi) {
char *data;
size_t size;
exchange_json(&data, &size,
- "op: %Q, path: %Q, fh: %d",
+ "op: %Q, path: %Q, fh: %llu",
"release", path, fi->fh);
parse_and_free_response(data, size, "");
@@ -329,7 +329,7 @@ static int tabfs_opendir(const char *path, struct fuse_file_info *fi) {
"opendir", path, fi->flags);
parse_and_free_response(rdata, rsize,
- "fh: %d",
+ "fh: %llu",
&fi->fh);
return 0;
@@ -365,7 +365,7 @@ static int tabfs_releasedir(const char *path, struct fuse_file_info *fi) {
char *rdata;
size_t rsize;
exchange_json(&rdata, &rsize,
- "op: %Q, path: %Q, fh: %d",
+ "op: %Q, path: %Q, fh: %llu",
"releasedir", path, fi->fh);
parse_and_free_response(rdata, rsize, "");
@@ -495,8 +495,10 @@ int main(int argc, char **argv) {
argv[0],
"-f",
#if !defined(__APPLE__)
+#if !defined(__FreeBSD__)
"-oauto_unmount",
#endif
+#endif
"-odirect_io",
getenv("TABFS_MOUNT_DIR"),
NULL,