Skip to content

Commit e7275cf

Browse files
committed
fusermount: Accept mount options, and completely ignore them
When using fuse-exfat, fusermount actually recives some options, but these are entirely safe to ignore, so let's just do that (and log a warning) to get things working.
1 parent 0ad761d commit e7275cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Userland/Utilities/fusermount.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
2828
{
2929
StringView fd_string;
3030
StringView target;
31+
StringView mount_options;
3132

3233
Core::ArgsParser args_parser;
3334
args_parser.set_general_help("Mount a FUSE-based filesystem");
3435
args_parser.add_positional_argument(fd_string, "File descriptor to mount", "fd");
3536
args_parser.add_positional_argument(target, "Path to mount location", "target");
37+
args_parser.add_option(mount_options, "Mount options", "mount-options", 'o', "mount-options");
3638
args_parser.parse(arguments);
3739

3840
if (fd_string.is_empty())
@@ -41,6 +43,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
4143
if (target.is_empty())
4244
return Error::from_string_literal("No target passed");
4345

46+
if (!mount_options.is_empty())
47+
dbgln("Warning: The following mount options will be ignored: {}", mount_options);
48+
4449
auto maybe_fd = fd_string.to_number<int>();
4550
if (!maybe_fd.has_value())
4651
return Error::from_string_literal("Invalid file descriptor passed");

0 commit comments

Comments
 (0)