]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/agetty.c
agetty: support simplified color sequences in \e{name}
[thirdparty/util-linux.git] / term-utils / agetty.c
index d8d4f4259fa6d1ea85eafb2bf919a240f98444be..cf8725537b98a8e2824828b6c49d76bbaabb32e5 100644 (file)
@@ -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;