void console_puts_select_stderr(bool serial_only, const char *s)
{
- console_puts_select(stderr, serial_only, s);
+ if (gd->flags & GD_FLG_DEVINIT)
+ console_puts_select(stderr, serial_only, s);
}
static void console_puts(int file, const char *s)
void console_puts_select(int file, bool serial_only, const char *s)
{
- if (serial_only == console_dev_is_serial(stdio_devices[file]))
+ if ((gd->flags & GD_FLG_DEVINIT) &&
+ serial_only == console_dev_is_serial(stdio_devices[file]))
stdio_devices[file]->puts(stdio_devices[file], s);
}