ctty command without parameters to disable serial console.
This commit is contained in:
parent
9092146be7
commit
7d46116e47
2 changed files with 7 additions and 0 deletions
|
@ -1369,6 +1369,9 @@ void boot_device(char *devname)
|
|||
|
||||
void ctty(char *line)
|
||||
{
|
||||
if (line == nil) {
|
||||
serial_init(-1);
|
||||
} else
|
||||
if (between('0', line[0], '3') && line[1] == 0) {
|
||||
serial_init(line[0] - '0');
|
||||
} else {
|
||||
|
@ -1793,6 +1796,7 @@ void execute(void)
|
|||
case R_HELP: help(); ok= 1; break;
|
||||
case R_EXIT: exit(0);
|
||||
case R_OFF: off(); ok= 1; break;
|
||||
case R_CTTY: ctty(nil); ok= 1; break;
|
||||
}
|
||||
|
||||
/* Command to check bootparams: */
|
||||
|
|
|
@ -854,6 +854,9 @@ restore_video: ! To restore the video mode on exit
|
|||
_serial_init:
|
||||
mov bx, sp
|
||||
mov dx, 2(bx) ! Line number
|
||||
mov line, #0
|
||||
test dx, dx ! Off if line number < 0
|
||||
js 0f
|
||||
push ds
|
||||
xor ax, ax
|
||||
mov ds, ax ! Vector and BIOS data segment
|
||||
|
|
Loading…
Reference in a new issue