Skip to content

Commit 0ad761d

Browse files
committed
Ports/libfuse: Don't blanket-disable options we don't support
There's no need to do this, and this actually creates more informative errors when we encounter an unsupported options, since it'll be our own fusermount utility that complains rather than a library routine inside libfuse.
1 parent 04acc84 commit 0ad761d

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

Ports/libfuse/patches/0001-Disable-unsupported-functionality.patch

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,7 @@ index 73abc67..666be7f 100644
133133
#include <stdio.h>
134134
#include <stdlib.h>
135135
#include <unistd.h>
136-
@@ -50,6 +54,10 @@ struct mount_opts {
137-
static const struct fuse_opt fuse_mount_opts[] = {
138-
{ "allow_other", offsetof(struct mount_opts, allow_other), 1 },
139-
{ "max_read=%u", offsetof(struct mount_opts, max_read), 1 },
140-
+#ifdef __serenity__
141-
+ FUSE_DUAL_OPT_KEY("allow_other", KEY_KERN),
142-
+ FUSE_OPT_KEY("max_read=", KEY_KERN),
143-
+#else
144-
FUSE_OPT_KEY("-r", KEY_RO),
145-
/* standard FreeBSD mount options */
146-
FUSE_DUAL_OPT_KEY("dev", KEY_KERN),
147-
@@ -95,6 +103,7 @@ static const struct fuse_opt fuse_mount_opts[] = {
148-
* handle them
149-
*/
150-
FUSE_OPT_KEY("fsname=", KEY_KERN),
151-
+#endif
152-
FUSE_OPT_END
153-
};
154-
155-
@@ -115,10 +124,12 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
136+
@@ -115,10 +119,12 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
156137
struct mount_opts *mo = data;
157138

158139
switch (key) {
@@ -165,7 +146,7 @@ index 73abc67..666be7f 100644
165146
case KEY_KERN:
166147
return fuse_opt_add_opt(&mo->kernel_opts, arg);
167148
}
168-
@@ -130,12 +141,19 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
149+
@@ -130,12 +136,19 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
169150
void fuse_kern_unmount(const char *mountpoint, int fd)
170151
{
171152
close(fd);
@@ -185,7 +166,7 @@ index 73abc67..666be7f 100644
185166
unsigned ibg;
186167
size_t len;
187168

188-
@@ -145,6 +163,7 @@ static int init_backgrounded(void)
169+
@@ -145,6 +158,7 @@ static int init_backgrounded(void)
189170
return 0;
190171

191172
return ibg;

0 commit comments

Comments
 (0)