From owner-freebsd-emulation Wed Feb 20 8:51:37 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from fafoe.dyndns.org (chello212186121237.14.vie.surfer.at [212.186.121.237]) by hub.freebsd.org (Postfix) with ESMTP id 9E77237B400; Wed, 20 Feb 2002 08:51:30 -0800 (PST) Received: by stefan.fafoe (Postfix, from userid 1001) id A09F2EA17; Wed, 20 Feb 2002 17:50:28 +0100 (CET) To: FreeBSD-gnats-submit@freebsd.org Subject: [PATCH] Two little fixes From: Stefan Farfeleder Reply-To: Stefan Farfeleder Cc: freebsd-emulation@freebsd.org X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: <20020220165028.A09F2EA17@stefan.fafoe> Date: Wed, 20 Feb 2002 17:50:28 +0100 (CET) Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Submitter-Id: current-users >Originator: Stefan Farfeleder >Organization: >Confidential: no >Synopsis: [PATCH] Two little fixes >Severity: non-critical >Priority: low >Category: i386 >Class: sw-bug >Release: FreeBSD CURRENT >Environment: System: FreeBSD stefan.fafoe 4.5-STABLE FreeBSD 4.5-STABLE #5: Sun Feb 17 00:06:38 CET 2002 root@stefan.fafoe:/usr/obj/usr/src/sys/MORDOR i386 >Description: The first patch fixes the emulation of machine instructions with the 'rep' prefix. The code failed to set the cx register to 0. The second one tries to avoid a seg-fault when a dos programs calls int 10h function 0. If doscmd wasn't invoked with -x, it will currently dump core at tty.c:2201 in the call to XAllocColor because dpy is NULL. >How-To-Repeat: >Fix: Index: src/usr.bin/doscmd/cpu.c =================================================================== RCS file: /home/ncvs/src/usr.bin/doscmd/cpu.c,v retrieving revision 1.5 diff -u -r1.5 cpu.c --- src/usr.bin/doscmd/cpu.c 2 Dec 2001 13:44:05 -0000 1.5 +++ src/usr.bin/doscmd/cpu.c 20 Feb 2002 16:44:36 -0000 @@ -276,6 +276,7 @@ R_IP = --ip; /* Move IP back to the 'rep' instruction. */ return -1; } + R_CX = 0; break; default: /* Unknown instruction, get out of here and let trap.c:sigbus() Index: src/usr.bin/doscmd/int10.c =================================================================== RCS file: /home/ncvs/src/usr.bin/doscmd/int10.c,v retrieving revision 1.6 diff -u -r1.6 int10.c --- src/usr.bin/doscmd/int10.c 12 Oct 2001 10:31:00 -0000 1.6 +++ src/usr.bin/doscmd/int10.c 20 Feb 2002 16:44:13 -0000 @@ -56,6 +56,8 @@ switch (R_AH) { case 0x00: /* Set display mode */ + if (!xmode) + goto unsupported; init_mode(R_AL); break; case 0x01: /* Define cursor */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message