[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 12/27] cr-ensure-disk-space: Honour -D
Provide DEBUG and use db_prepare. For now that is the only debugging output. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- cr-ensure-disk-space | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 304f262..ced9777 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -27,11 +27,15 @@ use Fcntl qw(:flock); our $dryrun= 0; +open DEBUG, ">/dev/null" or die $!; + while (@ARGV && $ARGV[0] =~ m/^\-/) { $_= shift @ARGV; last if $_ eq '--'; if (m/^-n$/) { $dryrun= 1; + } elsif (m/^-D$/) { + open DEBUG, ">&2" or die $!; } else { die "$_ ?"; } @@ -50,7 +54,7 @@ flock LOCK, LOCK_EX or die $!; $|=1; -my $chkq= $dbh_tests->prepare("SELECT * FROM flights WHERE flight=?"); +my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?"); our @flights; for (;;) { -- 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 |