Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GP3sM-0002EM-MV for mharc-grub-devel@gnu.org; Sun, 17 Sep 2006 17:08:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GP3sL-0002BP-FT for grub-devel@gnu.org; Sun, 17 Sep 2006 17:08:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GP3sK-0002AJ-TN for grub-devel@gnu.org; Sun, 17 Sep 2006 17:08:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GP3sK-00029v-Q5 for grub-devel@gnu.org; Sun, 17 Sep 2006 17:08:28 -0400 Received: from [69.60.117.155] (helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GP3v1-0006LC-Qi for grub-devel@gnu.org; Sun, 17 Sep 2006 17:11:15 -0400 Received: from 138.red-62-57-141.user.auna.net ([62.57.141.138] helo=khazad.dyndns.org) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.63) (envelope-from ) id 1GP3s8-0001G6-A6 for grub-devel@gnu.org; Sun, 17 Sep 2006 23:08:16 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.63) (envelope-from ) id 1GP3sF-0005yy-H4 for grub-devel@gnu.org; Sun, 17 Sep 2006 23:08:23 +0200 Date: Sun, 17 Sep 2006 23:08:23 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20060917210823.GA22994@khazad.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. User-Agent: Mutt/1.5.13 (2006-08-11) Subject: [PATCH] Linux I2O devices 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: Sun, 17 Sep 2006 21:08:30 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Support for Linux I2O devices (imported from GRUB Legacy). 2006-09-17 Robert Millan Import from GRUB Legacy (lib/device.c): * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function. (init_device_map) [__linux__]: Add support for I2O devices. -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list. --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="06_linux_i2o.diff" 2006-09-17 Robert Millan Import from GRUB Legacy (lib/device.c): * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function. (init_device_map) [__linux__]: Add support for I2O devices. Index: util/i386/pc/grub-mkdevicemap.c =================================================================== RCS file: /sources/grub/grub2/util/i386/pc/grub-mkdevicemap.c,v retrieving revision 1.3 diff -u -r1.3 grub-mkdevicemap.c --- util/i386/pc/grub-mkdevicemap.c 14 Sep 2006 18:52:50 -0000 1.3 +++ util/i386/pc/grub-mkdevicemap.c 17 Sep 2006 21:06:27 -0000 @@ -277,6 +277,12 @@ { sprintf (name, "/dev/ataraid/d%c", unit + '0'); } + +static void +get_i2o_disk_name (char *name, char unit) +{ + sprintf (name, "/dev/i2o/hd%c", unit); +} #endif /* Check if DEVICE can be read. If an error occurs, return zero, @@ -482,6 +488,23 @@ } } } + + /* This is for I2O - we have /dev/i2o/hd */ + { + char unit; + + for (unit = 'a'; unit < 'f'; unit++) + { + char name[24]; + + get_i2o_disk_name (name, unit); + if (check_device (name)) + { + fprintf (fp, "(hd%d)\t%s\n", num_hd, name); + num_hd++; + } + } + } #endif /* __linux__ */ finish: --IS0zKkzwUGydFO0o--