diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
commit | 7c8871d31510865e40c8628ef765996202a3cc00 (patch) | |
tree | 622b7aa085999fe3d2908772ff0d0c6ec5bf4400 /src/machine/machinectl.c | |
parent | 7c257428969aaba2acc4e26753c86d6f4774354a (diff) | |
parent | f00022dd121c73b543ae667ddce9814bd67a1b73 (diff) |
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Diffstat (limited to 'src/machine/machinectl.c')
-rw-r--r-- | src/machine/machinectl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index d7e0395690..23cc74ab54 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -40,6 +40,7 @@ #include "copy.h" #include "env-util.h" #include "event-util.h" +#include "fd-util.h" #include "hostname-util.h" #include "import-util.h" #include "log.h" @@ -1092,9 +1093,10 @@ static int copy_files(int argc, char *argv[], void *userdata) { container_path = copy_from ? argv[2] : dest; if (!path_is_absolute(host_path)) { - abs_host_path = path_make_absolute_cwd(host_path); - if (!abs_host_path) - return log_oom(); + r = path_make_absolute_cwd(host_path, &abs_host_path); + if (r < 0) + return log_error_errno(r, "Failed to make path absolute: %m"); + host_path = abs_host_path; } @@ -1110,10 +1112,8 @@ static int copy_files(int argc, char *argv[], void *userdata) { argv[1], copy_from ? container_path : host_path, copy_from ? host_path : container_path); - if (r < 0) { - log_error("Failed to copy: %s", bus_error_message(&error, -r)); - return r; - } + if (r < 0) + return log_error_errno(r, "Failed to copy: %s", bus_error_message(&error, r)); return 0; } |