From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KVr2W-0003Wc-Eu for mharc-grub-devel@gnu.org; Wed, 20 Aug 2008 13:00:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVr2U-0003VJ-Sh for grub-devel@gnu.org; Wed, 20 Aug 2008 13:00:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVr2S-0003V7-Ge for grub-devel@gnu.org; Wed, 20 Aug 2008 13:00:05 -0400 Received: from [199.232.76.173] (port=42024 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVr2S-0003V4-6Y for grub-devel@gnu.org; Wed, 20 Aug 2008 13:00:04 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:39341 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KVr2R-00060o-MZ for grub-devel@gnu.org; Wed, 20 Aug 2008 13:00:04 -0400 Received: from [127.0.0.1] (88.193.32.97) by kirsi1.inet.fi (8.5.014) id 487B3C2C0178C902 for grub-devel@gnu.org; Wed, 20 Aug 2008 19:59:59 +0300 Message-ID: <48AC4D93.40809@nic.fi> Date: Wed, 20 Aug 2008 20:00:03 +0300 From: =?UTF-8?B?VmVzYSBKw6TDpHNrZWzDpGluZW4=?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: The development of GRUB 2 References: <48ABDC72.10200@isy.liu.se> <20080820101259.GB8201@thorin> In-Reply-To: <20080820101259.GB8201@thorin> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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 17:00:07 -0000 Robert Millan wrote: > On Wed, Aug 20, 2008 at 10:57:22AM +0200, Per =C3=96berg 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 b= y >> first writing 0xf9 to port 0x70 and then testing bit 0x08 of port 0x71= =2E >> >> It would be really nice if such a test could be enabled in grub so tha= t >> grub can go directly to a specific menu alternative without showing th= e >> gui if the media button was pressed. >> >> Is this interesting? I'd like to contribute but I don't know where to = start. >=20 > Sounds interesting, but this needs some thought on how to design it. >=20 > I suppose what you want is change the 'default' variable. Perhaps incr= ease > it by 1? But then, where do you do this? grub_machine_init is too ear= ly as > 'default' hasn't been set yet. >=20 > Maybe we could have a global 'int default_offset' variable that is init= ialized > in grub_machine_init and later on used by normal.mod? Nah... Do a module to query for it and if it is there then use scripting to do alternative path within script. Much better and more convenient. And you can use script to increment default variable if needed :)