Skip to content

Commit 721ccae

Browse files
mhiramatrichardweinberger
authored andcommitted
um: Add os_warn() for pre-boot warning/error messages
Add os_warn() for printing out pre-boot warning/error messages in stderr. The messages via os_warn() are not suppressed by quiet option. Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent d3878bb commit 721ccae

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

arch/um/include/shared/os.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ extern void um_early_printk(const char *s, unsigned int n);
244244
extern void os_fix_helper_signals(void);
245245
extern void os_info(const char *fmt, ...)
246246
__attribute__ ((format (printf, 1, 2)));
247+
extern void os_warn(const char *fmt, ...)
248+
__attribute__ ((format (printf, 1, 2)));
247249

248250
/* time.c */
249251
extern void os_idle_sleep(unsigned long long nsecs);

arch/um/os-Linux/util.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,12 @@ void os_info(const char *fmt, ...)
177177
vfprintf(stderr, fmt, list);
178178
va_end(list);
179179
}
180+
181+
void os_warn(const char *fmt, ...)
182+
{
183+
va_list list;
184+
185+
va_start(list, fmt);
186+
vfprintf(stderr, fmt, list);
187+
va_end(list);
188+
}

0 commit comments

Comments
 (0)