Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LzWDX-0000a9-KB for mharc-grub-devel@gnu.org; Thu, 30 Apr 2009 09:22:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LzWDV-0000ZF-T9 for grub-devel@gnu.org; Thu, 30 Apr 2009 09:22:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LzWDU-0000YQ-Oq for grub-devel@gnu.org; Thu, 30 Apr 2009 09:22:21 -0400 Received: from [199.232.76.173] (port=33307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzWDU-0000YN-L5 for grub-devel@gnu.org; Thu, 30 Apr 2009 09:22:20 -0400 Received: from 74-93-104-97-washington.hfc.comcastbusiness.net ([74.93.104.97]:34499 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LzWDU-0008M1-Aw for grub-devel@gnu.org; Thu, 30 Apr 2009 09:22:20 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id B40AAC8D92C for ; Thu, 30 Apr 2009 06:22:13 -0700 (PDT) Date: Thu, 30 Apr 2009 06:22:13 -0700 (PDT) Message-Id: <20090430.062213.214984004.davem@davemloft.net> To: grub-devel@gnu.org From: David Miller X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH]: Handle virtual disk device names on powerpc/sparc64 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: Thu, 30 Apr 2009 13:22:22 -0000 PowerPC and Sparc64 virtualized disks on hypervisor systems are named /dev/vdiskX instead of /dev/vdX. Handle this. Committed. 2009-04-30 David S. Miller * util/hostdisk.c (convert_system_partition_to_system_disk): Handle virtual disk devices named /dev/vdiskX as found on sparc and powerpc. diff --git a/util/hostdisk.c b/util/hostdisk.c index aa41703..eaccb73 100644 --- a/util/hostdisk.c +++ b/util/hostdisk.c @@ -767,6 +767,13 @@ convert_system_partition_to_system_disk (const char *os_dev) } /* If this is an IDE, SCSI or Virtio disk. */ + if (strncmp ("vdisk", p, 5) == 0 + && p[5] >= 'a' && p[5] <= 'z') + { + /* /dev/vdisk[a-z][0-9]* */ + p[6] = '\0'; + return path; + } if ((strncmp ("hd", p, 2) == 0 || strncmp ("vd", p, 2) == 0 || strncmp ("sd", p, 2) == 0)