From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LsPmn-0007ny-PK for mharc-grub-devel@gnu.org; Fri, 10 Apr 2009 19:05:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsPml-0007nd-Ds for grub-devel@gnu.org; Fri, 10 Apr 2009 19:05:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsPmf-0007n7-WA for grub-devel@gnu.org; Fri, 10 Apr 2009 19:05:22 -0400 Received: from [199.232.76.173] (port=49435 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsPmf-0007n4-Qd for grub-devel@gnu.org; Fri, 10 Apr 2009 19:05:17 -0400 Received: from fg-out-1718.google.com ([72.14.220.152]:24291) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsPmf-0006Ey-9g for grub-devel@gnu.org; Fri, 10 Apr 2009 19:05:17 -0400 Received: by fg-out-1718.google.com with SMTP id 19so372924fgg.7 for ; Fri, 10 Apr 2009 16:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=EJbyLyBRnisJaC6fARijo0ly38Pgq6+VIaha6Y3eGg8=; b=LdSq6EYmxowgGmU/Z3jWtiZ/zMDzEwqOT8EzgXzPudOgzjinkzhIYUJQV+oMTrCDx5 6I9JARd6B1ENdjTbt9CbgIRPx85Lgoj/Fxj8Kbs3w6vssvYHB4MCmbljXXKNBSev2r9D TYtM8HJiZ20v/fMPO+pNsHaRCplCGEwLU3gn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=DY3vEkMqZrRlpDCF1vIlXeXCWdkPOF/p2lgTpZoqZKT5VCoT5TDWmgxMoAPy2kPiUQ 2DWIApbPCNJk8TcCaii3EGjJl26GmcyyFMOt/fOCnCQWEfa+QNQv9fFd3V/qE0hM1Hfb bZ0qWt2d+k+uWu0gNeIve8nCfFA0kJRJhIRaA= Received: by 10.86.98.10 with SMTP id v10mr1360607fgb.36.1239404716574; Fri, 10 Apr 2009 16:05:16 -0700 (PDT) Received: from ?192.168.1.25? (16-189.62-81.cust.bluewin.ch [81.62.189.16]) by mx.google.com with ESMTPS id 3sm2634865fge.29.2009.04.10.16.05.15 (version=SSLv3 cipher=RC4-MD5); Fri, 10 Apr 2009 16:05:16 -0700 (PDT) Message-ID: <49DFD0AF.2070803@gmail.com> Date: Sat, 11 Apr 2009 01:05:19 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: The development of GRUB 2 References: <20090304163509.GA26106@riva.ucam.org> <20090304211629.GJ31201@thorin> <20090304212356.GL31201@thorin> In-Reply-To: <20090304212356.GL31201@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Support up to 256 SCSI disks on Linux 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: Fri, 10 Apr 2009 23:05:24 -0000 Robert Millan wrote: > On Wed, Mar 04, 2009 at 10:16:29PM +0100, Robert Millan wrote: >>> else if (major == SCSI_DISK0_MAJOR) >>> - sprintf (name, "/dev/sd%c", 'a' + minor / 16); >>> + grub_util_getdiskname_scsi (name, 0, minor / 16); >>> + else if (major == SCSI_DISK1_MAJOR) >>> + grub_util_getdiskname_scsi (name, 1, minor / 16); >>> [...] >> Can this be factorized somehow? Space in raid.mod is quite critical; when >> used it usually ends up in core.img, which needs to fit in the embed area. > > Oh, I'm sorry. I thought you were editting disk/raid.c. util/raid.c has no > size issues. A macro would still be nice though. > What about making an array of SCSI_DISK?_MAJOR and then just go through it? -- Regards Vladimir 'phcoder' Serbinenko