[CRIU] [PATCH] crtools: add EOL to error messages
Andrey Vagin
avagin at openvz.org
Fri Nov 23 02:53:25 EST 2012
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-check.c | 2 +-
cr-restore.c | 4 ++--
pie/parasite.c | 6 +++---
proc_parse.c | 4 ++--
pstree.c | 2 +-
util.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/cr-check.c b/cr-check.c
index 8d6e382..32ac164 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -297,7 +297,7 @@ static int check_fdinfo_eventpoll(void)
close(pfd[1]);
if (ret) {
- pr_err("Error parsing proc fdinfo");
+ pr_err("Error parsing proc fdinfo\n");
return -1;
}
diff --git a/cr-restore.c b/cr-restore.c
index 0636772..b73497a 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -574,7 +574,7 @@ static int pstree_wait_helpers()
return -1;
}
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
- pr_err("%d exited with non-zero code (%d,%d)", pi->pid.virt,
+ pr_err("%d exited with non-zero code (%d,%d)\n", pi->pid.virt,
WEXITSTATUS(status), WTERMSIG(status));
return -1;
}
@@ -1542,7 +1542,7 @@ static int prepare_restorer_blob(void)
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANON, 0, 0);
if (restorer == MAP_FAILED) {
- pr_err("Can't map restorer code");
+ pr_perror("Can't map restorer code");
return -1;
}
diff --git a/pie/parasite.c b/pie/parasite.c
index f71db99..fcfcf27 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -105,7 +105,7 @@ static int dump_pages_init()
fd_pagemap = sys_open("/proc/self/pagemap", O_RDONLY, 0);
if (fd_pagemap < 0) {
- pr_err("Can't open self pagemap");
+ pr_err("Can't open self pagemap\n");
sys_close(fd_pages);
return fd_pagemap;
}
@@ -163,14 +163,14 @@ static int dump_pages(struct parasite_dump_pages_args *args)
off = pfn * sizeof(*map);
off = sys_lseek(fd_pagemap, off, SEEK_SET);
if (off != pfn * sizeof(*map)) {
- pr_err("Can't seek pagemap");
+ pr_err("Can't seek pagemap\n");
ret = off;
goto err_free;
}
ret = sys_read(fd_pagemap, map, length);
if (ret != length) {
- pr_err("Can't read self pagemap");
+ pr_err("Can't read self pagemap\n");
goto err_free;
}
diff --git a/proc_parse.c b/proc_parse.c
index d585b2c..c075c03 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -190,7 +190,7 @@ int parse_smaps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
&start, &end, &r, &w, &x, &s, &pgoff, &dev_maj,
&dev_min, &ino, file_path);
if (num < 10) {
- pr_err("Can't parse: %s", buf);
+ pr_err("Can't parse: %s\n", buf);
goto err;
}
@@ -663,7 +663,7 @@ static int parse_mnt_opt(char *str, struct mount_info *mi, int *off)
while (1) {
end = strchr(str, ' ');
if (!end) {
- pr_err("Error parsing mount options");
+ pr_err("Error parsing mount options\n");
return -1;
}
diff --git a/pstree.c b/pstree.c
index 2b323b5..83d2a0e 100644
--- a/pstree.c
+++ b/pstree.c
@@ -261,7 +261,7 @@ int prepare_pstree(void)
}
if (parent == NULL) {
- pr_err("Can't find a parent for %d", pi->pid.virt);
+ pr_err("Can't find a parent for %d\n", pi->pid.virt);
pstree_entry__free_unpacked(e, NULL);
xfree(pi);
goto err;
diff --git a/util.c b/util.c
index 610f6fd..d2dbec0 100644
--- a/util.c
+++ b/util.c
@@ -222,7 +222,7 @@ int set_proc_mountpoint(char *path)
sfd = dup2(fd, sfd);
close(fd);
if (sfd < 0) {
- pr_err("Can't set proc fd");
+ pr_err("Can't set proc fd\n");
return -1;
}
--
1.7.11.7
More information about the CRIU
mailing list