[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v2 2/4] ts-hosts-allocate-Executive: add a label to loop over candidates
I'm going to want to "next CANDIDATE" from within a nested loop. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- ts-hosts-allocate-Executive | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index c9aae88..294395d 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -313,6 +313,7 @@ END my @candidates; my $any=0; + CANDIDATE: while (my $candrow= $findhostsq->fetchrow_hashref()) { $candrow->{Warnings}= [ ]; $candrow->{Reso}= "$candrow->{restype} $candrow->{resname}"; @@ -343,7 +344,7 @@ END my $erow= $equivflagscheckq->fetchrow_hashref(); if (!$erow) { print DEBUG "$dbg EQUIV $equiv->{FormalClass} NO-CLASSES\n"; - next; + next CANDIDATE; } my $eq= $erow->{hostflag}; print DEBUG "$dbg EQUIV $equiv->{FormalClass} MAYBE $eq\n"; @@ -358,7 +359,7 @@ END print DEBUG "$dbg FLAGS MISSINGFLAGS: @missingflags.\n"; if (@missingflags) { - next unless defined $use; + next CANDIDATE unless defined $use; push @{ $candrow->{Warnings} }, "specified host lacks flags @missingflags"; } -- 2.5.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |