systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used
Fixes #6591.
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user