From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 05/19] Refactor pxelinux configuration Date: Fri, 19 Jun 2015 10:53:32 +0100 Message-ID: <1434707612.28264.67.camel@citrix.com> References: <1434644687.28264.53.camel@citrix.com> <1434644710-28881-5-git-send-email-ian.campbell@citrix.com> <21891.1204.390933.200005@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21891.1204.390933.200005@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-18 at 18:49 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 05/19] Refactor pxelinux configuration"): > > The mechanism used to PXE boot can differ depending on the firmware > > type. Therefore refactor into Osstest::TestSupport and key off a new > > host property "firmware". > > > > Currently supported is "bios" (the default) and "uboot", both of which > > use pxelinux.cfg style files. > > > > The default for the firmware property is "bios", hence no change for > > any existing system (including those which use uboot, regardless of > > whether they are now configured with the firmware proprty or not) > > > + return &{"setup_${firmware}_pxeboot"}($ho,$kern,$initrd,$dicmd,$hocmd,%xopts); > > Are you expecting to introduce setup_FIRMWARE_SOMETHINGELSE ? I think initially I was initially expecting to but ended up not needing to. I will assume you would also prefer "setup_${firmware}_pxeboot_local" to become "setup_pxeboot_local_${firmware}" (rather than "setup_pxeboot_ ${firmware}_local"). > AFIACT not, in which case this name is quite confusing. Putting the > variable part at the end would be much clearer: > setup_pxeboot_${firmware}. > > > @@ -287,18 +288,8 @@ END > > my $dicmd= join ' ', @dicmdline; > > my $hocmd= join ' ', @hocmdline; > ... > > + $xopts{ipappend} = $ipappend; > > + setup_pxeboot($ho, $kernel, "/$initrd", $dicmd, $hocmd, %xopts); > > Perhaps setup_pxeboot (which maybe should be renamed?) should do the > joining ? You could pass \@dicmdline and \@hocmdline. Good idea. Do you think setup_pxeboot maybe ought to be setup_pxeboot_di or something along those lines? Ian.