From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [osstest test] 56922: regressions - FAIL Date: Sun, 24 May 2015 14:53:10 +0100 Message-ID: <1432475590.5748.160.camel@citrix.com> References: <1432288654.10746.161.camel@citrix.com> <1432294374.14664.12.camel@citrix.com> <1432297842.14664.32.camel@citrix.com> <1432298867.26800.5.camel@localhost> <1432299517.14664.37.camel@citrix.com> <1432302144.14664.43.camel@citrix.com> <1432304517.14664.48.camel@citrix.com> <1432369911.12629.5.camel@localhost> <1432371223.12629.11.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432371223.12629.11.camel@localhost> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: robert.hu@intel.com Cc: "Pang, LongtaoX" , ian.jackson@eu.citrix.com, xen-devel List-Id: xen-devel@lists.xenproject.org On Sat, 2015-05-23 at 16:53 +0800, Robert Hu wrote: > > > + $#offsets = $#offsets-1; > > > + $offsets[$#offsets]++; > may consider 'pop/push' operations on @offsets array? I worry about if > '$#offsets-1' can always shrink array size correctly. pop/push anyway is > some official way to do this. Assigning to $#offsets is defined to change the length of the array. But I think you are correct that pop/push would be a more idiomatic way to do this. It is a public holiday on Monday, but I'll take a look on Tuesday, unless you fancy doing it in the meantime. > @@ -446,11 +446,12 @@ sub setupboot_grub2 ($$$$) { > > > } > > > if (m/^menuentry\s+[\'\"](.*)[\'\"].*\{\s*$/) { > > > die $entry->{StartLine} if $entry; > > > - $entry= { Title => $1, StartLine => $., Number => $count }; > > > - $count++; > > > + $entry= { Title => $1, StartLine => $., MenuEntryPath => join ">", @offsets }; > > > + $offsets[$#offsets]++; > > > } > > > if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) { > > > - $submenu={ StartLine =>$.}; > > > + $submenu={ StartLine =>$., MenuEntryPath => join ">", @offsets }; > Here MenuEntryPath element for $submenu is actually debug purpose only, > I think, may be can remove it. correct me if I'm wrong. It is just for debug, I think it would be OK to leave it though. Ian.