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