Provide DEBUG and use db_prepare.  For now that is the only debugging
output.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to