Commit abd06148 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

pr_perror(): don't end message with a period

When pr_perror is used, an error message is appended with a comma
and an strerror(errno), so we should not put a period at the end,
otherwise we'll end up with something like this:

	Error: Can't bind.: Permission denied

Found by git grep -w pr_perror | grep '\."'
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 07846585
...@@ -100,7 +100,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req) ...@@ -100,7 +100,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
char images_dir_path[PATH_MAX]; char images_dir_path[PATH_MAX];
if (getsockopt(sk, SOL_SOCKET, SO_PEERCRED, &ids, &ids_len)) { if (getsockopt(sk, SOL_SOCKET, SO_PEERCRED, &ids, &ids_len)) {
pr_perror("Can't get socket options."); pr_perror("Can't get socket options");
return -1; return -1;
} }
...@@ -133,7 +133,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req) ...@@ -133,7 +133,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
log_set_loglevel(req->log_level); log_set_loglevel(req->log_level);
if (log_init(opts.output) == -1) { if (log_init(opts.output) == -1) {
pr_perror("Can't initiate log."); pr_perror("Can't initiate log");
return -1; return -1;
} }
...@@ -351,7 +351,7 @@ int cr_service(bool daemon_mode) ...@@ -351,7 +351,7 @@ int cr_service(bool daemon_mode)
server_fd = socket(AF_LOCAL, SOCK_SEQPACKET, 0); server_fd = socket(AF_LOCAL, SOCK_SEQPACKET, 0);
if (server_fd == -1) { if (server_fd == -1) {
pr_perror("Can't initialize service socket."); pr_perror("Can't initialize service socket");
goto err; goto err;
} }
...@@ -372,7 +372,7 @@ int cr_service(bool daemon_mode) ...@@ -372,7 +372,7 @@ int cr_service(bool daemon_mode)
if (bind(server_fd, (struct sockaddr *) &server_addr, if (bind(server_fd, (struct sockaddr *) &server_addr,
server_addr_len) == -1) { server_addr_len) == -1) {
pr_perror("Can't bind."); pr_perror("Can't bind");
goto err; goto err;
} }
...@@ -380,12 +380,12 @@ int cr_service(bool daemon_mode) ...@@ -380,12 +380,12 @@ int cr_service(bool daemon_mode)
/* change service socket permissions, so anyone can connect to it */ /* change service socket permissions, so anyone can connect to it */
if (chmod(server_addr.sun_path, 0666)) { if (chmod(server_addr.sun_path, 0666)) {
pr_perror("Can't change permissions of the service socket."); pr_perror("Can't change permissions of the service socket");
goto err; goto err;
} }
if (listen(server_fd, 16) == -1) { if (listen(server_fd, 16) == -1) {
pr_perror("Can't listen for socket connections."); pr_perror("Can't listen for socket connections");
goto err; goto err;
} }
} }
...@@ -414,7 +414,7 @@ int cr_service(bool daemon_mode) ...@@ -414,7 +414,7 @@ int cr_service(bool daemon_mode)
sk = accept(server_fd, &client_addr, &client_addr_len); sk = accept(server_fd, &client_addr, &client_addr_len);
if (sk == -1) { if (sk == -1) {
pr_perror("Can't accept connection."); pr_perror("Can't accept connection");
goto err; goto err;
} }
......
...@@ -246,13 +246,13 @@ int open_image_dir(char *dir) ...@@ -246,13 +246,13 @@ int open_image_dir(char *dir)
ret = symlinkat(opts.img_parent, fd, CR_PARENT_LINK); ret = symlinkat(opts.img_parent, fd, CR_PARENT_LINK);
if (ret < 0) { if (ret < 0) {
pr_perror("Can't link parent snapshot."); pr_perror("Can't link parent snapshot");
goto err; goto err;
} }
pfd = openat(fd, CR_PARENT_LINK, O_RDONLY); pfd = openat(fd, CR_PARENT_LINK, O_RDONLY);
if (pfd < 0) { if (pfd < 0) {
pr_perror("Can't open parent snapshot."); pr_perror("Can't open parent snapshot");
goto err; goto err;
} }
......
...@@ -126,7 +126,7 @@ try_again: ...@@ -126,7 +126,7 @@ try_again:
if (ptrace(PTRACE_CONT, pid, NULL, if (ptrace(PTRACE_CONT, pid, NULL,
(void *)(unsigned long)si.si_signo)) { (void *)(unsigned long)si.si_signo)) {
pr_perror("Can't continue signal handling. Aborting."); pr_perror("Can't continue signal handling, aborting");
goto err; goto err;
} }
......
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