util: highlight questions, so that they cannot be overseen in other log spew

This commit is contained in:
Lennart Poettering 2010-04-23 20:51:06 +02:00
parent d4d0d4db93
commit b1b2dc0ce9
1 changed files with 4 additions and 0 deletions

4
util.c
View File

@ -1429,10 +1429,14 @@ int ask(char *ret, const char *replies, const char *text, ...) {
int r;
bool need_nl = true;
fputs("\x1B[1m", stdout);
va_start(ap, text);
vprintf(text, ap);
va_end(ap);
fputs("\x1B[0m", stdout);
fflush(stdout);
if ((r = read_one_char(stdin, &c, &need_nl)) < 0) {