From: Ian Jackson Subject: [OSSTEST PATCH 21/32] cr-ensure-disk-space: Fix -n option Date: Tue, 24 Mar 2015 19:02:44 +0000 Message-ID: <1427223775-8592-22-git-send-email-ian.jackson@eu.citrix.com> References: <1427223775-8592-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaU6b-00006I-EO for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 19:03:13 +0000 In-Reply-To: <1427223775-8592-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 This would not really do a dry run - instead it would stop after deleting one flight's logs! Signed-off-by: Ian Jackson --- cr-ensure-disk-space | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 884be26..1c665b3 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -99,6 +99,8 @@ for (;;) { printf "..."; + die if $dryrun; + my $spawn= sub { $!=0; my $r= system @_; die "@_ $r $!" if $r; }; @@ -114,7 +116,6 @@ END $spawn->(qw(rm -rf), $flight); printf "done.\n"; - exit 0 if $dryrun; } printf "ok.\n"; -- 1.7.10.4