aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2022-10-06 23:59:56 +0300
committerMartin Pärtel <martin.partel@gmail.com>2022-10-07 00:00:07 +0300
commit6fa5cd6480c83240cff72265ccdc45bcdb9576f6 (patch)
treed4aaecc0472db29c00df3209616216507ae21570
parente0aba6935e01ab7928967278aaeb9a0660fea644 (diff)
downloadbindfs-6fa5cd6480c83240cff72265ccdc45bcdb9576f6.tar.gz
Basic OpenBSD support. The test suite does not pass yet.
For #121
-rw-r--r--ChangeLog4
-rw-r--r--src/bindfs.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fc7f9b..2076ab1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-06 Martin Pärtel <martin dot partel at gmail dot com>
+
+ * Basic OpenBSD support. The test suite does not pass yet.
+
2022-07-12 Martin Pärtel <martin dot partel at gmail dot com>
* Reverted change in 1.16.0 that made direct_io the default.
diff --git a/src/bindfs.c b/src/bindfs.c
index 13695de..65384dc 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -709,7 +709,11 @@ static void *bindfs_init()
strerror(errno)
);
bindfs_init_failed = true;
+#ifdef __OpenBSD__
+ exit(1);
+#else
fuse_exit(fuse_get_context()->fuse);
+#endif
}
return NULL;
@@ -1663,7 +1667,9 @@ static struct fuse_operations bindfs_oper = {
.lock = bindfs_lock,
.flock = bindfs_flock,
#endif
+#ifndef __OpenBSD__
.ioctl = bindfs_ioctl,
+#endif
.statfs = bindfs_statfs,
.release = bindfs_release,
.fsync = bindfs_fsync,
@@ -2825,10 +2831,17 @@ int main(int argc, char *argv[])
}
#endif
+#ifdef __OpenBSD__
+ if (settings.enable_ioctl) {
+ fprintf(stderr, "--enable-ioctl not supported on OpenBSD\n");
+ return 1;
+ }
+#else
/* Remove the ioctl implementation unless the user has enabled it */
if (!settings.enable_ioctl) {
bindfs_oper.ioctl = NULL;
}
+#endif
/* Remove/Ignore some special -o options */
args = filter_special_opts(&args);