From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 3/9] config: Tiny fixes Date: Tue, 17 Feb 2015 17:50:25 +0000 Message-ID: <1424195431-1493-4-git-send-email-ian.jackson@eu.citrix.com> References: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YNmUt-0004yg-8I for xen-devel@lists.xenproject.org; Tue, 17 Feb 2015 18:03:47 +0000 In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.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: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org * Default $c{DebianPreseed} to '' (previously, if it wasn't specified, there would be undefined variable warnings). * Cope with empty < --- Osstest.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Osstest.pm b/Osstest.pm index fc9698b..6d7c083 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -74,6 +74,8 @@ our %c = qw( DebianNonfreeFirmware firmware-bnx2 ); +$c{DebianPreseed} = ''; + #---------- general setup and config reading ---------- sub getmethod { @@ -120,7 +122,7 @@ sub readglobalconfig () { $val .= $_; } die $! unless length $_; - die unless $val =~ m/\n$/; + die unless !length $val || $val =~ m/\n$/; if ($qu eq '') { my $reconstruct = "\$val = <<${qu}${delim}${qu}; 1;\n". -- 1.7.10.4