From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KVkhv-0003H7-Op for mharc-grub-devel@gnu.org; Wed, 20 Aug 2008 06:14:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVkhu-0003FC-Bo for grub-devel@gnu.org; Wed, 20 Aug 2008 06:14:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVkht-0003Dd-FB for grub-devel@gnu.org; Wed, 20 Aug 2008 06:14:25 -0400 Received: from [199.232.76.173] (port=41723 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVkht-0003DG-6s for grub-devel@gnu.org; Wed, 20 Aug 2008 06:14:25 -0400 Received: from aybabtu.com ([69.60.117.155]:57859) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVkhs-0003CL-SB for grub-devel@gnu.org; Wed, 20 Aug 2008 06:14:25 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KVkZ2-00073A-3m for grub-devel@gnu.org; Wed, 20 Aug 2008 12:05:16 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KVkgV-0003Ck-BJ for grub-devel@gnu.org; Wed, 20 Aug 2008 12:12:59 +0200 Date: Wed, 20 Aug 2008 12:12:59 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080820101259.GB8201@thorin> References: <48ABDC72.10200@isy.liu.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <48ABDC72.10200@isy.liu.se> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Dell Media Direct button X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 10:14:26 -0000 On Wed, Aug 20, 2008 at 10:57:22AM +0200, Per Öberg wrote: > Hi > > Some laptops, e.g., from Dell have a special button that they use to > boot a special embedded OS for media only instead of the ordinary OS. > > For my Dell XPS1330M I can determine if the Media button was pressed by > first writing 0xf9 to port 0x70 and then testing bit 0x08 of port 0x71. > > It would be really nice if such a test could be enabled in grub so that > grub can go directly to a specific menu alternative without showing the > gui if the media button was pressed. > > Is this interesting? I'd like to contribute but I don't know where to start. Sounds interesting, but this needs some thought on how to design it. I suppose what you want is change the 'default' variable. Perhaps increase it by 1? But then, where do you do this? grub_machine_init is too early as 'default' hasn't been set yet. Maybe we could have a global 'int default_offset' variable that is initialized in grub_machine_init and later on used by normal.mod? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."