mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 02:26:11 +00:00
![implicitfield](/assets/img/avatar_default.png)
This is essentially the de facto way to interface with FUSE, and as such, pretty much every port that uses FUSE in any way will depend on this. Of all the examples that we compile, 'hello', 'hello_ll' and 'passthrough' have been verified to work.
49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
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 serenity
|
|
|
|
---
|
|
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 __serenity__
|
|
+ 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 __serenity__
|
|
+#define FUSERMOUNT_PROG "fusermount"
|
|
+#else
|
|
#define FUSERMOUNT_PROG "mount_fusefs"
|
|
+#endif
|
|
#define FUSE_DEV_TRUNK "/dev/fuse"
|
|
|
|
enum {
|