Ensure that a serial port is set up before used.

This commit is contained in:
okuji committed 2001-10-13 12:02:30 +00:00
1 parent a8ac7eb3f9
commit 61928d1323
11 files changed
+58 -11

No files matched your search

+7
View File
@@ -1026,6 +1026,13 @@ serial_get_port (int unit)
return 0;
}
/* Check if a serial port is set up. */
int
serial_exists (void)
{
return serial_fd >= 0;
}
/* Initialize a serial device. In the grub shell, PORT is unused. */
int
serial_init (unsigned short port, unsigned int speed,