From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: implicitfield <114500360+implicitfield@users.noreply.github.com>
Date: Mon, 5 Feb 2024 19:34:40 +0400
Subject: [PATCH] Teach the mount helpers about minerva

---
 lib/helper.c    | 4 ++++
 lib/mount_bsd.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/lib/helper.c b/lib/helper.c
index 14a0df3..133904b 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -178,6 +178,9 @@ static int fuse_helper_opt_proc(void *data, const char *arg, int key,
    function actually sets the fsname */
 static int add_default_subtype(const char *progname, struct fuse_args *args)
 {
+#ifdef __minerva__
+	return 0;
+#else
 	int res;
 	char *subtype_opt;
 
@@ -200,6 +203,7 @@ static int add_default_subtype(const char *progname, struct fuse_args *args)
 	res = fuse_opt_add_arg(args, subtype_opt);
 	free(subtype_opt);
 	return res;
+#endif
 }
 
 int fuse_parse_cmdline_312(struct fuse_args *args,
diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c
index 666be7f..0dac299 100644
--- a/lib/mount_bsd.c
+++ b/lib/mount_bsd.c
@@ -34,7 +34,11 @@
 #include <paths.h>
 #include <limits.h>
 
+#ifdef __minerva__
+#define FUSERMOUNT_PROG		"fusermount"
+#else
 #define FUSERMOUNT_PROG		"mount_fusefs"
+#endif
 #define FUSE_DEV_TRUNK		"/dev/fuse"
 
 enum {
