From: Alan Jenkins Date: Mon, 7 Aug 2017 16:23:41 +0000 (+0100) Subject: getty-generator: shift relevant comment to above tty_is_vc() X-Git-Tag: v235~244^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54194afb99541cd4fc1bd005f7cd2b8bf1470a1b;p=thirdparty%2Fsystemd.git getty-generator: shift relevant comment to above tty_is_vc() Comments typically go immediately above the code to implement the described behaviour. Putting it below confused me for a moment. --- diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index b15c76b5b8f..a143b5413bd 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -201,16 +201,16 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } + /* We assume that gettys on virtual terminals are + * started via manual configuration and do this magic + * only for non-VC terminals. */ + if (isempty(tty) || tty_is_vc(tty)) continue; if (verify_tty(tty) < 0) continue; - /* We assume that gettys on virtual terminals are - * started via manual configuration and do this magic - * only for non-VC terminals. */ - if (add_serial_getty(tty) < 0) return EXIT_FAILURE; }