diff mbox

[OSSTEST,2/3] cr-ensure-disk-space: Break out quit_ok

Message ID 1469442883-26212-2-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson July 25, 2016, 10:34 a.m. UTC
We are going to want another call site.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 cr-ensure-disk-space | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index bb98835..6a9781a 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -61,6 +61,13 @@  sub check_space () {
     return $space >= logcfg('MinSpaceMby');
 }
 
+sub quit_ok () {
+    printf "ok.\n";
+    exit 0;
+}
+
+$|=1;
+
 exit 0 if check_space;
 
 my $lock = "$c{GlobalLockDir}/publish-lock";
@@ -156,5 +163,4 @@  db_retry($dbh_tests,[], sub {
     }
 });
 
-printf "ok.\n";
-exit 0;
+quit_ok();