From: Karel Zak Date: Mon, 27 Feb 2023 16:52:45 +0000 (+0100) Subject: agetty: support simplified color sequences in \e{name} X-Git-Tag: v2.39-rc1~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00ad6f2c7c789fb6fe7874f754a39ef3e6ed4d8f;p=thirdparty%2Futil-linux.git agetty: support simplified color sequences in \e{name} Signed-off-by: Karel Zak --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index d8d4f4259f..cf8725537b 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2736,9 +2736,12 @@ static void output_special_char(struct issue *ie, char escname[UL_COLORNAME_MAXSZ]; if (get_escape_argument(fp, escname, sizeof(escname))) { - const char *esc = color_sequence_from_colorname(escname); - if (esc) + char *esc = color_get_sequence(escname); + + if (esc) { fputs(esc, ie->output); + free(esc); + } } else fputs("\033", ie->output); break;