diff options
author | YmrDtnJu <YmrDtnJu@users.noreply.github.com> | 2020-06-08 19:25:18 +0200 |
---|---|---|
committer | YmrDtnJu <YmrDtnJu@users.noreply.github.com> | 2020-06-08 19:36:42 +0200 |
commit | c15ab81ed9fa9437fdc31b6761ad331f6fd52400 (patch) | |
tree | 12fe36bd77123aee88714508211775e72fb005a6 /src/mount | |
parent | basic: New function fstype_is_blockdev_backed for fstypes that need a blockdev (diff) | |
download | systemd-c15ab81ed9fa9437fdc31b6761ad331f6fd52400.tar.xz systemd-c15ab81ed9fa9437fdc31b6761ad331f6fd52400.zip |
mount-tool: Replace fstype_is_{network,api_vfs} with fstype_is_blockdev_backed
Not every filesystem that is not a network filesystem and also not an API VFS
filesystem has a corresponding block device.
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 469c14271c..ea86a6e06a 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -364,7 +364,7 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "At most two arguments required."); - if (arg_mount_type && (fstype_is_api_vfs(arg_mount_type) || fstype_is_network(arg_mount_type))) { + if (arg_mount_type && !fstype_is_blockdev_backed(arg_mount_type)) { arg_mount_what = strdup(argv[optind]); if (!arg_mount_what) return log_oom(); @@ -1463,7 +1463,7 @@ static int run(int argc, char* argv[]) { if (arg_action == ACTION_UMOUNT) return action_umount(bus, argc, argv); - if ((!arg_mount_type || !fstype_is_network(arg_mount_type)) + if ((!arg_mount_type || fstype_is_blockdev_backed(arg_mount_type)) && !path_is_normalized(arg_mount_what)) { log_error("Path contains non-normalized components: %s", arg_mount_what); return -EINVAL; |