aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Buckley <david@davidbuckley.ca>2021-01-02 23:03:41 -0500
committerDavid Buckley <david@davidbuckley.ca>2021-01-02 23:03:41 -0500
commit9f38203ebfb18995ac120646f3d1999b9109bdca (patch)
tree9cd2a8242f180ddc280563d31a44784765893c5d /fs
parent598c67a7753e80f312da0557f1c7f2305d15ead3 (diff)
parentdcce4221a2122c2d62c2f6c45761374dc8e08ecb (diff)
Merge branch 'master' of github.com:osnr/TabFS
Diffstat (limited to 'fs')
-rw-r--r--fs/Makefile7
-rw-r--r--fs/tabfs.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/fs/Makefile b/fs/Makefile
index e5a4b18..97ca01a 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -4,6 +4,9 @@ TARGETS = tabfs
OSXFUSE_ROOT = /usr/local
#OSXFUSE_ROOT = /opt/local
+# Root for libraries from FreeBSD's ports
+FREEBSD_ROOT = /usr/local
+
CFLAGS_EXTRA = -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -Wall -Wno-unused-function -g
ifeq ($(shell uname -s),Linux)
@@ -14,6 +17,10 @@ ifeq ($(shell uname -s),Darwin)
CFLAGS = -I$(OSXFUSE_ROOT)/include/osxfuse/fuse -L$(OSXFUSE_ROOT)/lib -D_DARWIN_USE_64_BIT_INODE $(CFLAGS_EXTRA)
LIBS = -losxfuse
endif
+ifeq ($(shell uname -s),FreeBSD)
+ CFLAGS += -L$(FREEBSD_ROOT)/lib -I$(FREEBSD_ROOT)/include $(CFLAGS_EXTRA)
+ LIBS = -lfuse
+endif
all: $(TARGETS)
diff --git a/fs/tabfs.c b/fs/tabfs.c
index f674216..90895f2 100644
--- a/fs/tabfs.c
+++ b/fs/tabfs.c
@@ -225,6 +225,8 @@ int main(int argc, char **argv) {
char unmountcmd[1000];
#ifdef __APPLE__
sprintf(unmountcmd, "diskutil umount force %s > /dev/null", mountdir);
+#elif __FreeBSD__
+ sprintf(unmountcmd, "umount -f %s", mountdir);
#else
sprintf(unmountcmd, "fusermount -u %s", mountdir);
#endif