From 642d73b8b4bc56d165ca80babf9757d2b6f7ef68 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 13 Dec 2016 01:04:50 +0900 Subject: [PATCH] sbin/hammer: Fix rename printfs to differentiate recover paths This helps understand recovery path from stdout. It doesn't really matter if the change makes any sense to real users, because most printfs by this command aren't understandable anyway unless one looks at the code. --- sbin/hammer/cmd_recover.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/hammer/cmd_recover.c b/sbin/hammer/cmd_recover.c index 6b39f51b6f..1446779ec6 100644 --- a/sbin/hammer/cmd_recover.c +++ b/sbin/hammer/cmd_recover.c @@ -402,7 +402,7 @@ recover_elm(hammer_btree_leaf_elm_t leaf) /* chmod(path1, 0666); */ } if (strcmp(path1, path2)) { - printf("Rename %s -> %s\n", path1, path2); + printf("Rename (inode) %s -> %s\n", path1, path2); rename(path1, path2); } } else if (ondisk->inode.obj_type == HAMMER_OBJTYPE_REGFILE) { @@ -581,7 +581,7 @@ recover_elm(hammer_btree_leaf_elm_t leaf) } path2 = recover_path(dict2); if (strcmp(path1, path2) != 0 && lstat(path1, &st) == 0) { - printf("Rename %s -> %s\n", path1, path2); + printf("Rename (entry) %s -> %s\n", path1, path2); rename(path1, path2); } free(path1); -- 2.11.4.GIT