Commit ca393ebd authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

sources: fix pr_perror usage

This is log cleanup patch.
Pr_perror prints new line by itself.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1c7afb7f
......@@ -1245,7 +1245,7 @@ static int restore_cgroup_prop(const CgroupPropEntry * cg_prop_entry_p,
len = strlen(cg_prop_entry_p->value);
if (write(fd, cg_prop_entry_p->value, len) != len) {
pr_perror("Failed writing %s to %s\n", cg_prop_entry_p->value, path);
pr_perror("Failed writing %s to %s", cg_prop_entry_p->value, path);
goto out;
}
......
......@@ -1024,7 +1024,7 @@ static int wait_on_helpers_zombies(void)
switch (pi->state) {
case TASK_DEAD:
if (waitid(P_PID, pid, NULL, WNOWAIT | WEXITED) < 0) {
pr_perror("Wait on %d zombie failed\n", pid);
pr_perror("Wait on %d zombie failed", pid);
return -1;
}
break;
......
......@@ -163,7 +163,7 @@ static char *alloc_openable(unsigned int s_dev, unsigned long i_ino, FhEntry *f_
openable_fd = openat(mntfd, __path, O_PATH);
if (openable_fd >= 0) {
if (fstat(openable_fd, &st)) {
pr_perror("Can't stat on %s\n", __path);
pr_perror("Can't stat on %s", __path);
close(openable_fd);
return ERR_PTR(-errno);
}
......
......@@ -55,7 +55,7 @@ int do_task_reset_dirty_track(int pid)
if (errno == EINVAL) /* No clear-soft-dirty in kernel */
ret = 1;
else {
pr_perror("Can't reset %d's dirty memory tracker (%d)\n", pid, errno);
pr_perror("Can't reset %d's dirty memory tracker (%d)", pid, errno);
ret = -1;
}
} else {
......
......@@ -1372,7 +1372,7 @@ static int parse_binfmt_misc_entry(struct bfd *f, BinfmtMiscEntry *bme)
DUP_EQUAL_AS("mask ", mask)
#undef DUP_EQUAL_AS
pr_perror("binfmt_misc: unsupported feature %s\n", str);
pr_perror("binfmt_misc: unsupported feature %s", str);
return -1;
}
......@@ -2249,7 +2249,7 @@ static int fetch_rt_stat(struct mount_info *m, const char *where)
struct stat st;
if (stat(where, &st)) {
pr_perror("Can't stat on %s\n", where);
pr_perror("Can't stat on %s", where);
return -1;
}
......@@ -2368,7 +2368,7 @@ static int mount_clean_path()
static int umount_clean_path()
{
if (umount2(mnt_clean_path, MNT_DETACH)) {
pr_perror("Unable to umount %s\n", mnt_clean_path);
pr_perror("Unable to umount %s", mnt_clean_path);
return -1;
}
......
......@@ -689,7 +689,7 @@ static int check_user_ns(int pid)
}
if (setgroups(0, NULL) < 0) {
pr_perror("Unable to drop supplementary groups\n");
pr_perror("Unable to drop supplementary groups");
return -1;
}
......
......@@ -327,7 +327,7 @@ static int vma_get_mapfile(char *fname, struct vma_area *vma, DIR *mfd,
}
if (fstat(fd, vma->vmst) < 0) {
pr_perror("Can't stat [%s]\n", fname);
pr_perror("Can't stat [%s]", fname);
close(fd);
return -1;
}
......@@ -2238,7 +2238,7 @@ int parse_task_cgroup(int pid, struct parasite_dump_cgroup_args *args, struct li
f = fmemopen(args->contents, strlen(args->contents), "r");
if (!f) {
pr_perror("couldn't fmemopen cgroup buffer:\n%s\n", args->contents);
pr_perror("couldn't fmemopen cgroup buffer:\n%s", args->contents);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment