[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 3/9] config: Tiny fixes
* Default $c{DebianPreseed} to '' (previously, if it wasn't specified, there would be undefined variable warnings). * Cope with empty <<END-notated config items in the configuration file parser. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |