init: Add a (user) prefix to logs when not running as system init

This commit is contained in:
apio 2024-01-19 21:21:07 +01:00
parent 9c36ef6e9e
commit 16223b2f53
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -48,6 +48,8 @@ static void do_log(const char* format, ...)
va_list ap;
va_start(ap, format);
if (!g_is_system) fprintf(g_init_log, "(user) ");
if (g_init_log) vfprintf(g_init_log, format, ap);
va_end(ap);
@ -58,6 +60,8 @@ static void do_errlog(const char* format, ...)
va_list ap;
va_start(ap, format);
fprintf(stderr, "(user) ");
vfprintf(stderr, format, ap);
va_end(ap);