Commit 9e1bde4d authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

pr_err(): don't forget a newline

Unlike pr_perror(), pr_err() does not append a newline.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 88e5db74
...@@ -25,7 +25,7 @@ int compel_cpuid(compel_cpuinfo_t *info) ...@@ -25,7 +25,7 @@ int compel_cpuid(compel_cpuinfo_t *info)
info->hwcap[1] = getauxval(AT_HWCAP2); info->hwcap[1] = getauxval(AT_HWCAP2);
if (!info->hwcap[0] || !info->hwcap[1]) { if (!info->hwcap[0] || !info->hwcap[1]) {
pr_err("Can't read the hardware capabilities"); pr_err("Can't read the hardware capabilities\n");
return -1; return -1;
} }
......
...@@ -515,7 +515,7 @@ int ptrace_get_regs(pid_t pid, user_regs_struct_t *regs) ...@@ -515,7 +515,7 @@ int ptrace_get_regs(pid_t pid, user_regs_struct_t *regs)
return ret; return ret;
} }
pr_err("PTRACE_GETREGSET read %zu bytes for pid %d, but native/compat regs sizes are %zu/%zu bytes", pr_err("PTRACE_GETREGSET read %zu bytes for pid %d, but native/compat regs sizes are %zu/%zu bytes\n",
iov.iov_len, pid, iov.iov_len, pid,
sizeof(regs->native), sizeof(regs->compat)); sizeof(regs->native), sizeof(regs->compat));
return -1; return -1;
......
...@@ -896,7 +896,7 @@ int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned l ...@@ -896,7 +896,7 @@ int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned l
ret = arch_fetch_sas(ctl, ctl->rsigframe); ret = arch_fetch_sas(ctl, ctl->rsigframe);
if (ret) { if (ret) {
pr_err("Can't fetch sigaltstack for task %d (ret %d)", pr_err("Can't fetch sigaltstack for task %d (ret %d)\n",
ctl->rpid, ret); ctl->rpid, ret);
goto err; goto err;
} }
......
...@@ -68,13 +68,13 @@ int cpu_validate_cpuinfo(void) ...@@ -68,13 +68,13 @@ int cpu_validate_cpuinfo(void)
goto error; goto error;
if (cpu_info->n_ppc64_entry != 1) { if (cpu_info->n_ppc64_entry != 1) {
pr_err("No PPC64 related entry in image"); pr_err("No PPC64 related entry in image\n");
goto error; goto error;
} }
cpu_ppc64_entry = cpu_info->ppc64_entry[0]; cpu_ppc64_entry = cpu_info->ppc64_entry[0];
if (cpu_ppc64_entry->endian != CURRENT_ENDIANNESS) { if (cpu_ppc64_entry->endian != CURRENT_ENDIANNESS) {
pr_err("Bad endianness"); pr_err("Bad endianness\n");
goto error; goto error;
} }
......
...@@ -30,7 +30,8 @@ static inline void free_compat_syscall_stack(void *mem) ...@@ -30,7 +30,8 @@ static inline void free_compat_syscall_stack(void *mem)
long int ret = sys_munmap(mem, PAGE_SIZE); long int ret = sys_munmap(mem, PAGE_SIZE);
if (ret) if (ret)
pr_err("munmap() of compat addr %p failed with %ld", mem, ret); pr_err("munmap() of compat addr %p failed with %ld\n",
mem, ret);
} }
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
......
...@@ -422,12 +422,12 @@ static int add_cgroup_properties(const char *fpath, struct cgroup_dir *ncd, ...@@ -422,12 +422,12 @@ static int add_cgroup_properties(const char *fpath, struct cgroup_dir *ncd,
const cgp_t *cgp = cgp_get_props(controller->controllers[i]); const cgp_t *cgp = cgp_get_props(controller->controllers[i]);
if (dump_cg_props_array(fpath, ncd, cgp) < 0) { if (dump_cg_props_array(fpath, ncd, cgp) < 0) {
pr_err("dumping known properties failed"); pr_err("dumping known properties failed\n");
return -1; return -1;
} }
if (dump_cg_props_array(fpath, ncd, &cgp_global) < 0) { if (dump_cg_props_array(fpath, ncd, &cgp_global) < 0) {
pr_err("dumping global properties failed"); pr_err("dumping global properties failed\n");
return -1; return -1;
} }
} }
...@@ -1069,7 +1069,7 @@ static int move_in_cgroup(CgSetEntry *se, bool setup_cgns) ...@@ -1069,7 +1069,7 @@ static int move_in_cgroup(CgSetEntry *se, bool setup_cgns)
pr_info("Move into %d\n", se->id); pr_info("Move into %d\n", se->id);
if (setup_cgns && prepare_cgns(se) < 0) { if (setup_cgns && prepare_cgns(se) < 0) {
pr_err("failed preparing cgns"); pr_err("failed preparing cgns\n");
return -1; return -1;
} }
......
...@@ -555,7 +555,7 @@ static int open_core(int pid, CoreEntry **pcore) ...@@ -555,7 +555,7 @@ static int open_core(int pid, CoreEntry **pcore)
img = open_image(CR_FD_CORE, O_RSTR, pid); img = open_image(CR_FD_CORE, O_RSTR, pid);
if (!img) { if (!img) {
pr_err("Can't open core data for %d", pid); pr_err("Can't open core data for %d\n", pid);
return -1; return -1;
} }
...@@ -1717,7 +1717,7 @@ static int prepare_userns_hook(void) ...@@ -1717,7 +1717,7 @@ static int prepare_userns_hook(void)
return -1; return -1;
if (prepare_loginuid(INVALID_UID, LOG_ERROR) < 0) { if (prepare_loginuid(INVALID_UID, LOG_ERROR) < 0) {
pr_err("Setting loginuid for CT init task failed, CAP_AUDIT_CONTROL?"); pr_err("Setting loginuid for CT init task failed, CAP_AUDIT_CONTROL?\n");
return -1; return -1;
} }
return 0; return 0;
...@@ -1730,7 +1730,7 @@ static void restore_origin_ns_hook(void) ...@@ -1730,7 +1730,7 @@ static void restore_origin_ns_hook(void)
/* not critical: it does not affect CT in any way */ /* not critical: it does not affect CT in any way */
if (prepare_loginuid(saved_loginuid, LOG_ERROR) < 0) if (prepare_loginuid(saved_loginuid, LOG_ERROR) < 0)
pr_err("Restore original /proc/self/loginuid failed"); pr_err("Restore original /proc/self/loginuid failed\n");
} }
static int write_restored_pid(void) static int write_restored_pid(void)
......
...@@ -565,7 +565,8 @@ int main(int argc, char *argv[], char *envp[]) ...@@ -565,7 +565,8 @@ int main(int argc, char *argv[], char *envp[])
if (!strcmp("net", optarg)) if (!strcmp("net", optarg))
opts.empty_ns |= CLONE_NEWNET; opts.empty_ns |= CLONE_NEWNET;
else { else {
pr_err("Unsupported empty namespace: %s", optarg); pr_err("Unsupported empty namespace: %s\n",
optarg);
return 1; return 1;
} }
break; break;
......
...@@ -1323,7 +1323,7 @@ static int make_parent_dirs_if_need(int mntns_root, char *path) ...@@ -1323,7 +1323,7 @@ static int make_parent_dirs_if_need(int mntns_root, char *path)
p = last_delim = strrchr(path, '/'); p = last_delim = strrchr(path, '/');
if (!p) { if (!p) {
pr_err("Path %s has no parent dir", path); pr_err("Path %s has no parent dir\n", path);
return -1; return -1;
} }
*p = '\0'; *p = '\0';
......
...@@ -613,7 +613,7 @@ static bool btrfs_sb_equal(struct mount_info *a, struct mount_info *b) ...@@ -613,7 +613,7 @@ static bool btrfs_sb_equal(struct mount_info *a, struct mount_info *b)
bool equal; bool equal;
if (!posa || !posb) { if (!posa || !posb) {
pr_err("invalid btrfs options, no subvol argument"); pr_err("invalid btrfs options, no subvol argument\n");
return false; return false;
} }
......
...@@ -192,7 +192,7 @@ int render_lsm_profile(char *profile, char **val) ...@@ -192,7 +192,7 @@ int render_lsm_profile(char *profile, char **val)
switch (lsmtype) { switch (lsmtype) {
case LSMTYPE__APPARMOR: case LSMTYPE__APPARMOR:
if (strcmp(profile, "unconfined") != 0 && asprintf(val, "changeprofile %s", profile) < 0) { if (strcmp(profile, "unconfined") != 0 && asprintf(val, "changeprofile %s", profile) < 0) {
pr_err("allocating lsm profile failed"); pr_err("allocating lsm profile failed\n");
*val = NULL; *val = NULL;
return -1; return -1;
} }
...@@ -219,7 +219,7 @@ int parse_lsm_arg(char *arg) ...@@ -219,7 +219,7 @@ int parse_lsm_arg(char *arg)
aux = strchr(arg, ':'); aux = strchr(arg, ':');
if (aux == NULL) { if (aux == NULL) {
pr_err("invalid argument %s for --lsm-profile", arg); pr_err("invalid argument %s for --lsm-profile\n", arg);
return -1; return -1;
} }
......
...@@ -3267,7 +3267,7 @@ int collect_mnt_namespaces(bool for_dump) ...@@ -3267,7 +3267,7 @@ int collect_mnt_namespaces(bool for_dump)
if (ret == -EPERM) if (ret == -EPERM)
pr_info("Can't mount binfmt_misc: EPERM. Running in user_ns?\n"); pr_info("Can't mount binfmt_misc: EPERM. Running in user_ns?\n");
else if (ret < 0 && ret != -EBUSY && ret != -ENODEV && ret != -ENOENT) { else if (ret < 0 && ret != -EBUSY && ret != -ENODEV && ret != -ENOENT) {
pr_err("Can't mount binfmt_misc: %d %s", ret, strerror(-ret)); pr_err("Can't mount binfmt_misc: %d %s\n", ret, strerror(-ret));
goto err; goto err;
} else if (ret == 0) { } else if (ret == 0) {
ret = -1; ret = -1;
......
...@@ -2201,7 +2201,7 @@ int devpts_check_bindmount(struct mount_info *m) ...@@ -2201,7 +2201,7 @@ int devpts_check_bindmount(struct mount_info *m)
return 0; return 0;
if (sscanf(m->root, "/%d", &index) != 1) { if (sscanf(m->root, "/%d", &index) != 1) {
pr_err("Unable to parse %s", m->root); pr_err("Unable to parse %s\n", m->root);
return -1; return -1;
} }
...@@ -2234,7 +2234,8 @@ found: ...@@ -2234,7 +2234,8 @@ found:
} }
if (master_mp->nsid->type != NS_ROOT) { if (master_mp->nsid->type != NS_ROOT) {
pr_err("The master for %s isn't from the root mntns", m->root); pr_err("The master for %s isn't from the root mntns\n",
m->root);
return -1; 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