Commit 1945a83b authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: More detailed printing on unpaired slaves

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 22a13778
...@@ -166,9 +166,12 @@ int tty_verify_active_pairs(void) ...@@ -166,9 +166,12 @@ int tty_verify_active_pairs(void)
return -1; return -1;
} }
pr_debug("Unpaired slave %d\n", tty_get_index(i));
if (++unpaired_slaves > 1) { if (++unpaired_slaves > 1) {
pr_err("Only one slave external peer " pr_err("Only one slave external peer "
"is allowed\n"); "is allowed (index %d)\n",
tty_get_index(i));
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