Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GP49n-0003jr-8K for mharc-grub-devel@gnu.org; Sun, 17 Sep 2006 17:26:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GP49l-0003hc-Oh for grub-devel@gnu.org; Sun, 17 Sep 2006 17:26:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GP49l-0003hM-5c for grub-devel@gnu.org; Sun, 17 Sep 2006 17:26:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GP49l-0003hJ-01 for grub-devel@gnu.org; Sun, 17 Sep 2006 17:26:29 -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 1GP4CS-0008Ay-5t for grub-devel@gnu.org; Sun, 17 Sep 2006 17:29:16 -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 1GP49Y-0001Gl-Dg for grub-devel@gnu.org; Sun, 17 Sep 2006 23:26:16 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.63) (envelope-from ) id 1GP49G-00061F-TQ for grub-devel@gnu.org; Sun, 17 Sep 2006 23:25:58 +0200 Date: Sun, 17 Sep 2006 23:25:58 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20060917212558.GA23125@khazad.dyndns.org> References: <20060917210823.GA22994@khazad.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060917210823.GA22994@khazad.dyndns.org> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: [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:26:30 -0000 I overlooked that biosdisk.c seems to be doing more specific checks on the pathname now. if (have_devfs () && strcmp (real_dev + len - 5, "/disc") == 0) { p = real_dev + len - 4; format = "part%d"; } else if ((strncmp (real_dev + 5, "hd", 2) == 0 || strncmp (real_dev + 5, "sd", 2) == 0) && real_dev[7] >= 'a' && real_dev[7] <= 'z') { p = real_dev + 8; format = "%d"; } else if (strncmp (real_dev + 5, "rd/c", 4) == 0) { p = strchr (real_dev + 9, 'd'); if (! p) return 0; p++; while (*p && isdigit (*p)) p++; format = "p%d"; } else { free (real_dev); return 0; } For I2O we have /dev/i2o/hd[a-z][0-9]. There's also a big family of device sets using this scheme (/dev/*/hd[a-z][0-9]). Unless the second "if" can be made the default option, we'll have to add knowledge of every of these device paths here? On Sun, Sep 17, 2006 at 11:08:23PM +0200, Robert Millan wrote: > > 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. > 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: > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- 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.