From 4dcdea2cf1be0a6220c042196a7a03e8795b1ea8 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 4 Mar 2006 21:10:30 +0000 Subject: [PATCH] r4474: Added options to change the "mount" and "umount" commands. This may be useful for using programs such as "pmount" and "pumount" (which allows mounting removable media without an fstab entry, or encrypted filesystems). --- ROX-Filer/Options.xml | 4 ++++ ROX-Filer/src/action.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ROX-Filer/Options.xml b/ROX-Filer/Options.xml index 0eb3098a..0e2d516d 100644 --- a/ROX-Filer/Options.xml +++ b/ROX-Filer/Options.xml @@ -276,6 +276,10 @@ operation, such as copying or deleting some files. Only over-write if source is newer than destination. + + The command used to mount a filesystem. If unsure, use "mount". + The command used to unmount a filesystem. If unsure, use "umount" (yes, without the first "n"). +
diff --git a/ROX-Filer/src/action.c b/ROX-Filer/src/action.c index f96e855a..9178c3b1 100644 --- a/ROX-Filer/src/action.c +++ b/ROX-Filer/src/action.c @@ -124,6 +124,9 @@ static Option o_action_delete, o_action_mount; static Option o_action_force, o_action_brief, o_action_recurse; static Option o_action_newer; +static Option o_action_mount_command; +static Option o_action_umount_command; + /* Whenever the text in these boxes is changed we store a copy of the new * string to be used as the default next time. */ @@ -1611,7 +1614,8 @@ static void do_mount(const guchar *path, gboolean mount) check_flags(); - argv[0] = mount ? "mount" : "umount"; + argv[0] = mount ? o_action_mount_command.value + : o_action_umount_command.value; argv[1] = path; if (quiet) @@ -2342,6 +2346,11 @@ void action_init(void) option_add_int(&o_action_brief, "action_brief", FALSE); option_add_int(&o_action_recurse, "action_recurse", FALSE); option_add_int(&o_action_newer, "action_newer", FALSE); + + option_add_string(&o_action_mount_command, + "action_mount_command", "mount"); + option_add_string(&o_action_umount_command, + "action_umount_command", "umount"); } #define MAX_ASK 4 -- 2.11.4.GIT