From: Philip Homburg Date: Mon, 8 Jan 2007 14:30:11 +0000 (+0000) Subject: ctty command without parameters to disable serial console. X-Git-Tag: v3.1.3~122 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.conf.5.html?a=commitdiff_plain;h=7d46116e47ac3cfcde894ecd266f0883e3b91f86;p=minix.git ctty command without parameters to disable serial console. --- diff --git a/boot/boot.c b/boot/boot.c index 4d9db242b..eae2ae75c 100755 --- a/boot/boot.c +++ b/boot/boot.c @@ -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: */ diff --git a/boot/boothead.s b/boot/boothead.s index f00b3f4dd..b79689c3b 100755 --- a/boot/boothead.s +++ b/boot/boothead.s @@ -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