]> Zhao Yanbai Git Server - minix.git/commitdiff
ctty command without parameters to disable serial console.
authorPhilip Homburg <philip@cs.vu.nl>
Mon, 8 Jan 2007 14:30:11 +0000 (14:30 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Mon, 8 Jan 2007 14:30:11 +0000 (14:30 +0000)
boot/boot.c
boot/boothead.s

index 4d9db242be2dd8ba9142933cdf77a89264ccb3f3..eae2ae75c85b18dffff8ab21d3caafc33b49a07c 100755 (executable)
@@ -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: */
index f00b3f4dd0636629f9894edee19a2f4c62d837bc..b79689c3b610a21688204b942874c01e9ebb0017 100755 (executable)
@@ -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