[CRIU] [PATCH 2/3] Assorted trivial message fixes

Kir Kolyshkin kir at openvz.org
Tue Jan 31 17:08:04 EST 2012


* kid -> child
* First letter should be uppercase
* Misc typos in messages and comments

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 cr-dump.c    |    2 +-
 cr-restore.c |    4 ++--
 crtools.c    |    5 +++--
 proc_parse.c |    4 ++--
 util.c       |    8 ++++----
 uts_ns.c     |    2 +-
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index 4e75bae..8a0e147 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1123,7 +1123,7 @@ static int dump_one_zombie(struct pstree_item *item, struct proc_pid_stat *pps,
 	struct core_entry *core;
 
 	if (item->nr_children) {
-		pr_err("Zombie %d with kids?\n", item->pid);
+		pr_err("Zombie %d with children.\n", item->pid);
 		return -1;
 	}
 
diff --git a/cr-restore.c b/cr-restore.c
index 28532b2..74e6431 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -865,7 +865,7 @@ static int attach_pipe(int pid, struct pipe_entry *e, struct pipe_info *pi, int
 	char path[128];
 	int tmp, fd;
 
-	pr_info("\t%d: Wating for pipe %x to appear\n",
+	pr_info("\t%d: Waiting for pipe %x to appear\n",
 		pid, e->pipeid);
 
 	cr_wait_while(&pi->real_pid, 0);
@@ -1231,7 +1231,7 @@ static inline int fork_with_pid(int pid, unsigned long ns_clone_flags)
 	stack = mmap(NULL, STACK_SIZE, PROT_WRITE | PROT_READ,
 			MAP_PRIVATE | MAP_GROWSDOWN | MAP_ANONYMOUS, -1, 0);
 	if (stack == MAP_FAILED) {
-		pr_perror("Failed to map stack for kid");
+		pr_perror("Failed to map stack for the child");
 		goto err;
 	}
 
diff --git a/crtools.c b/crtools.c
index 4529a10..989f9a9 100644
--- a/crtools.c
+++ b/crtools.c
@@ -326,7 +326,8 @@ int main(int argc, char *argv[])
 			break;
 		case 'D':
 			if (chdir(optarg)) {
-				pr_perror("can't change working directory");
+				pr_perror("Can't change directory to %s",
+						optarg);
 				return -1;
 			}
 			break;
@@ -411,6 +412,6 @@ usage:
 	return -1;
 
 opt_pid_missing:
-	printk("No pid specified, -t or -p option missed?\n");
+	printk("No pid specified (-t or -p option missing)\n");
 	return -1;
 }
diff --git a/proc_parse.c b/proc_parse.c
index c875769..d42a331 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -37,7 +37,7 @@ int parse_maps(pid_t pid, int pid_dir, struct list_head *vma_area_list, bool use
 	if (use_map_files) {
 		map_files_dir = opendir_proc(pid_dir, "map_files");
 		if (!map_files_dir) {
-			pr_err("Can't open %d's, old kernel?\n", pid);
+			pr_perror("Can't open %d's map_files (old kernel?)\n", pid);
 			goto err;
 		}
 	}
@@ -72,7 +72,7 @@ int parse_maps(pid_t pid, int pid_dir, struct list_head *vma_area_list, bool use
 			vma_area->vm_file_fd = openat(dirfd(map_files_dir), path, O_RDONLY);
 			if (vma_area->vm_file_fd < 0) {
 				if (errno != ENOENT) {
-					pr_perror("Failed opening %d's map %lu", pid, start);
+					pr_perror("Can't open %d's map %lu", pid, start);
 					goto err;
 				}
 			}
diff --git a/util.c b/util.c
index 2cd16c0..1bb00a0 100644
--- a/util.c
+++ b/util.c
@@ -100,7 +100,7 @@ int close_safe(int *fd)
 		if (!ret)
 			*fd = -1;
 		else
-			pr_perror("Unable to close fd: %d", *fd);
+			pr_perror("Unable to close fd %d", *fd);
 	}
 
 	return ret;
@@ -116,11 +116,11 @@ int reopen_fd_as_safe(int new_fd, int old_fd, bool allow_reuse_fd)
 			if (fcntl(new_fd, F_GETFD) != -1 || errno != EBADF) {
 				if (new_fd < 3) {
 					/*
-					 * Standart descriptors.
+					 * Standard descriptors.
 					 */
-					pr_warning("fd = %d is already used\n", new_fd);
+					pr_warning("fd %d already in use\n", new_fd);
 				} else {
-					pr_err("fd = %d is already used\n", new_fd);
+					pr_err("fd %d already in use\n", new_fd);
 					return -1;
 				}
 			}
diff --git a/uts_ns.c b/uts_ns.c
index 04bfced..306aca3 100644
--- a/uts_ns.c
+++ b/uts_ns.c
@@ -71,7 +71,7 @@ static int prepare_uts_str(int fd, char *n)
 			return -1;
 		}
 
-		pr_info("Restoging %s to [%s]\n", n, str);
+		pr_info("Restoring %s to [%s]\n", n, str);
 
 		ret = write(fd, str, len);
 		close(fd);
-- 
1.7.5.4



More information about the CRIU mailing list