From owner-freebsd-hackers@FreeBSD.ORG Mon May 1 18:03:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AB8416A415 for ; Mon, 1 May 2006 18:03:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD9C443D60 for ; Mon, 1 May 2006 18:03:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k41I360W019536; Mon, 1 May 2006 14:03:12 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 1 May 2006 14:02:08 -0400 User-Agent: KMail/1.9.1 References: <445581DE.50901@centtech.com> <20060501130354.GA17701@toler.leo.org> <20060501130704.GA57024@gothmog.pc> In-Reply-To: <20060501130704.GA57024@gothmog.pc> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605011402.10403.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1433/Mon May 1 04:10:05 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Giorgos Keramidas , Alex Zbyslaw Subject: Re: Boot manager beep (revisited) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2006 18:03:22 -0000 On Monday 01 May 2006 09:07, Giorgos Keramidas wrote: > On 2006-05-01 15:03, Daniel Lang wrote: > > Alex Zbyslaw wrote on Mon, May 01, 2006 at 10:31:34AM +0100: > > [..] > > > >off by setting WITHOUT_BOOTEASY_BEEP in `/etc/src.conf'. > > [..] > > > WITH_BOOTEASY_BEEP so that it's off by default unless you turn it on > > > > Regardless what you decide, if such an option is created, please > > call it WITH/WITHOUT_BOOTZERO_BEEP or WITH/WITHOUT_BOOT0_BEEP. > > > > The current FreeBSD bootmanager is called 'boot0'. It has replaced > > booteasy (which was indeed used in the past) centuries ago. > > I'll do, thanks for the careful review of the diff :) How about the patch below. It restores the behavior of the beep only happening for invalid input by axeing the BSD/OS partition type from the lookup table. Index: boot0.S =================================================================== RCS file: /usr/cvs/src/sys/boot/i386/boot0/boot0.S,v retrieving revision 1.14 diff -u -r1.14 boot0.S --- boot0.S 8 Feb 2005 20:43:04 -0000 1.14 +++ boot0.S 1 May 2006 18:00:37 -0000 @@ -29,7 +29,7 @@ .set PRT_OFF,0x1be # Partition table .set TBL0SZ,0x3 # Table 0 size - .set TBL1SZ,0xb # Table 1 size + .set TBL1SZ,0xa # Table 1 size .set MAGIC,0xaa55 # Magic: bootable .set B0MAGIC,0xbb66 # Identification @@ -198,12 +198,16 @@ movb _OPT(%bp),%dl # Display decw %si # default callw putkey # key + jmp main.7_1 # Skip beep /* - * Start of input loop. Beep and take note of time + * Users's last try was bad, beep in displeasure. */ main.10: movb $ASCII_BEL,%al # Signal callw putchr # beep! - xorb %ah,%ah # BIOS: Get +/* + * Start of input loop. Take note of time + */ +main.7_1: xorb %ah,%ah # BIOS: Get int $0x1a # system time movw %dx,%di # Ticks when addw _TICKS(%bp),%di # timeout @@ -410,7 +414,7 @@ * These values indicate bootable types we know the names of. */ .byte 0x1, 0x6, 0x7, 0xb, 0xc, 0xe, 0x83 - .byte 0x9f, 0xa5, 0xa6, 0xa9 + .byte 0xa5, 0xa6, 0xa9 /* * These are offsets that match the known names above and point to the strings * that will be printed. os_misc will be used if the search of the above table @@ -423,7 +427,6 @@ .byte os_dos-. # Windows .byte os_dos-. # Windows .byte os_linux-. # Linux - .byte os_bsd-. # BSD/OS .byte os_freebsd-. # FreeBSD .byte os_bsd-. # OpenBSD .byte os_bsd-. # NetBSD -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org