From: Andre Noll Date: Wed, 5 May 2021 16:41:40 +0000 (+0200) Subject: shutdown_console(): Make umount commands work. X-Git-Tag: v1.0.0~14 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=885fca3fc29afa2f0b90c1fadc5a342a8ae38a27;p=micoforia.git shutdown_console(): Make umount commands work. Oops. we unmounted /dev/tty1 several times rather than looping over all ttys. --- diff --git a/micoforia.c b/micoforia.c index 4d267ec..d5f300e 100644 --- a/micoforia.c +++ b/micoforia.c @@ -943,7 +943,7 @@ static void shutdown_console(struct container_runtime *cr) char *console; for (n = 0; n < cr->num_ttys; n++) { - char *tty = msg("%s/tty1", cr->dev); + char *tty = msg("%s/tty%u", cr->dev, n); if (umount2(tty, MNT_DETACH) < 0) DEBUG_LOG("umount %s: %m\n", tty); free(tty);