[CRIU] [PATCH] tty: More detailed printing on unpaired slaves

Cyrill Gorcunov gorcunov at openvz.org
Fri Oct 19 09:59:22 EDT 2012


In case of errors it provides us more information about what is going on.

For example, in my test case I now can see where the error came from

 | (00.027248) tty: Unpaired slave 0
 | (00.027261) tty: Unpaired slave 2
 | (00.027273) Error (tty.c:174): tty: Only one slave external peer is allowed (index 2)

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 tty.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tty.c b/tty.c
index 8fd0fcd..d3d1576 100644
--- a/tty.c
+++ b/tty.c
@@ -166,9 +166,12 @@ int tty_verify_active_pairs(void)
 				return -1;
 			}
 
+			pr_debug("Unpaired slave %d\n", tty_get_index(i));
+
 			if (++unpaired_slaves > 1) {
 				pr_err("Only one slave external peer "
-				       "is allowed\n");
+				       "is allowed (index %d)\n",
+				       tty_get_index(i));
 				return -1;
 			}
 		}
-- 
1.7.7.6



More information about the CRIU mailing list