diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-21 03:07:01 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-21 03:26:16 +0900 |
commit | 657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76 (patch) | |
tree | 3624791030beb2dfd75b654f24cf818a1c6444e2 /src/mount | |
parent | f9dc94408d70dd2f44915f4c6d67dc498c1c6243 (diff) | |
download | systemd-657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76.tar.gz |
tree-wide: replace strjoin() with path_join()
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 4e9ab762e9..457ba4ea16 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -789,7 +789,7 @@ static int find_loop_device(const char *backing_file, char **loop_dev) { if (!startswith(de->d_name, "loop")) continue; - sys = strjoin("/sys/devices/virtual/block/", de->d_name, "/loop/backing_file"); + sys = path_join("/sys/devices/virtual/block", de->d_name, "loop/backing_file"); if (!sys) return -ENOMEM; @@ -802,7 +802,7 @@ static int find_loop_device(const char *backing_file, char **loop_dev) { if (files_same(fname, backing_file, 0) <= 0) continue; - l = strjoin("/dev/", de->d_name); + l = path_join("/dev", de->d_name); if (!l) return -ENOMEM; @@ -1125,7 +1125,7 @@ static int acquire_mount_where(sd_device *d) { if (!filename_is_valid(escaped)) return 0; - arg_mount_where = strjoin("/run/media/system/", escaped); + arg_mount_where = path_join("/run/media/system", escaped); } else arg_mount_where = strdup(v); @@ -1257,7 +1257,7 @@ static int discover_loop_backing_file(void) { return -EINVAL; } - arg_mount_where = strjoin("/run/media/system/", escaped); + arg_mount_where = path_join("/run/media/system", escaped); if (!arg_mount_where) return log_oom(); |