systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used

Fixes #6591.
This commit is contained in:
Yu Watanabe
2017-09-04 10:55:51 +09:00
parent 4185da7c4d
commit e2be442e79
3 changed files with 34 additions and 1 deletions
+7 -1
View File
@@ -30,6 +30,7 @@
#include "fd-util.h"
#include "fileio.h"
#include "fstab-util.h"
#include "mount-util.h"
#include "pager.h"
#include "parse-util.h"
#include "path-util.h"
@@ -330,7 +331,12 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
if (arg_transport == BUS_TRANSPORT_LOCAL) {
if (arg_mount_type && (fstype_is_api_vfs(arg_mount_type) || fstype_is_network(arg_mount_type))) {
arg_mount_what = strdup(argv[optind]);
if (!arg_mount_what)
return log_oom();
} else if (arg_transport == BUS_TRANSPORT_LOCAL) {
_cleanup_free_ char *u = NULL, *p = NULL;
u = fstab_node_to_udev_node(argv[optind]);