diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-12-01 01:27:53 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-12-03 00:29:03 +0900 |
commit | f4938c2ea523336b11572af6111acd07107fa3dd (patch) | |
tree | c3d58fc8b322c44386fde42a2939018a93210745 /src/mount | |
parent | 6442c2109c18af9fd208b2631cacaf1347c384a7 (diff) | |
download | systemd-f4938c2ea523336b11572af6111acd07107fa3dd.tar.gz |
mount: do not require that the specified directory exists
If the specified direcotry does not exist, then systemd creates it
when the mount unit starts. So, it is not necessary to check the
existence in the client tool.
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index f9ac20be5b..b454c45518 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -30,6 +30,7 @@ #include "escape.h" #include "fd-util.h" #include "fileio.h" +#include "fs-util.h" #include "fstab-util.h" #include "mount-util.h" #include "pager.h" @@ -361,16 +362,9 @@ static int parse_argv(int argc, char *argv[]) { if (argc > optind+1) { if (arg_transport == BUS_TRANSPORT_LOCAL) { - _cleanup_free_ char *p = NULL; - - r = path_make_absolute_cwd(argv[optind+1], &p); + r = chase_symlinks(argv[optind+1], NULL, CHASE_NONEXISTENT, &arg_mount_where); if (r < 0) return log_error_errno(r, "Failed to make path %s absolute: %m", argv[optind+1]); - - arg_mount_where = canonicalize_file_name(p); - if (!arg_mount_where) - return log_error_errno(errno, "Failed to canonicalize path %s: %m", p); - } else { arg_mount_where = strdup(argv[optind+1]); if (!arg_mount_where) |