files-reg: fixup order in message at link error path

Submitted by Pavel Tikhomirov on Dec. 11, 2018, 7:11 a.m.

Details

Message ID 20181211071125.23609-1-ptikhomirov@virtuozzo.com
State Accepted
Series "files-reg: fixup order in message at link error path"
Headers show

Commit Message

Pavel Tikhomirov Dec. 11, 2018, 7:11 a.m.
Error messages in linkat_hard and open_path about link errors contradict
each other, fix the wrong one.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 criu/files-reg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/files-reg.c b/criu/files-reg.c
index a20589b56..725d7be63 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -1660,8 +1660,8 @@  int open_path(struct file_desc *d,
 			static char tmp_path[PATH_MAX];
 
 			if (errno != EEXIST) {
-				pr_perror("Can't link %s -> %s", rfi->path,
-						rfi->remap->rpath);
+				pr_perror("Can't link %s -> %s",
+					  rfi->remap->rpath, rfi->path);
 				return -1;
 			}
 

Comments

Andrei Vagin Jan. 9, 2019, 7:13 a.m.
Applied, thanks!

On Tue, Dec 11, 2018 at 10:11:25AM +0300, Pavel Tikhomirov wrote:
> Error messages in linkat_hard and open_path about link errors contradict
> each other, fix the wrong one.
> 
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> ---
>  criu/files-reg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/criu/files-reg.c b/criu/files-reg.c
> index a20589b56..725d7be63 100644
> --- a/criu/files-reg.c
> +++ b/criu/files-reg.c
> @@ -1660,8 +1660,8 @@ int open_path(struct file_desc *d,
>  			static char tmp_path[PATH_MAX];
>  
>  			if (errno != EEXIST) {
> -				pr_perror("Can't link %s -> %s", rfi->path,
> -						rfi->remap->rpath);
> +				pr_perror("Can't link %s -> %s",
> +					  rfi->remap->rpath, rfi->path);
>  				return -1;
>  			}
>  
> -- 
> 2.17.1
>