From fc047eb03c8d35e54ab5e7b8d00d03847249f1e0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 21 Mar 2022 12:02:55 +0100 Subject: [PATCH] agetty: cleanup login prompt macro use Signed-off-by: Karel Zak --- term-utils/agetty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 22850786da..5b673e638b 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -144,8 +144,10 @@ #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); } } -- 2.47.2