]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: cleanup login prompt macro use
authorKarel Zak <kzak@redhat.com>
Mon, 21 Mar 2022 11:02:55 +0000 (12:02 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 30 Mar 2022 09:14:30 +0000 (11:14 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/agetty.c

index 22850786da0646f1aaa852f075962995570c01fc..5b673e638bdcb6e84263c2fa3e9d22f886238247 100644 (file)
 #endif
 
 /* Login prompt. */
-#define LOGIN          "login: "
-#define LOGIN_ARGV_MAX 16              /* Numbers of args for login */
+#define LOGIN_PROMPT           "login: "
+
+/* Numbers of args for login(1) */
+#define LOGIN_ARGV_MAX 16
 
 /*
  * agetty --reload
@@ -498,7 +500,8 @@ int main(int argc, char **argv)
                        /* Autologin prompt */
                        eval_issue_file(&issue, &options, &termios);
                        do_prompt(&issue, &options, &termios);
-                       printf(_("%s%s (automatic login)\n"), LOGIN, options.autolog);
+                       printf(_("%s%s (automatic login)\n"), LOGIN_PROMPT,
+                                       options.autolog);
                } else {
                        /* Read the login name. */
                        debug("reading login name\n");
@@ -2136,7 +2139,8 @@ again:
        }
        if (!op->autolog) {
                /* Always show login prompt. */
-               write_all(STDOUT_FILENO, LOGIN, sizeof(LOGIN) - 1);
+               write_all(STDOUT_FILENO, LOGIN_PROMPT,
+                               sizeof(LOGIN_PROCESS) - 1);
        }
 }