mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 17:49:23 +00:00
Ensure that a serial port is set up before used.
This commit is contained in:
1 parent
a8ac7eb3f9
commit
61928d1323
11 files changed
+58
-11
No files matched your search
+12
-3
@@ -3914,9 +3914,18 @@ terminal_func (char *arg, int flags)
|
||||
#ifdef SUPPORT_SERIAL
|
||||
else if (grub_memcmp (arg, "serial", sizeof ("serial") - 1) == 0)
|
||||
{
|
||||
terminal |= TERMINAL_SERIAL;
|
||||
if (! default_terminal)
|
||||
default_terminal = TERMINAL_SERIAL;
|
||||
if (serial_exists ())
|
||||
{
|
||||
terminal |= TERMINAL_SERIAL;
|
||||
if (! default_terminal)
|
||||
default_terminal = TERMINAL_SERIAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
terminal = saved_terminal;
|
||||
errnum = ERR_NEED_SERIAL;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif /* SUPPORT_SERIAL */
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user