From e727fbbbbd089b7992204a95ad9b15a539bc7d11 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:39:24 +0200 Subject: [PATCH] Test for $CONFIG{dontformat} just once --- bin/xen-create-image | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 6077b43..633d3b6 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -3426,15 +3426,17 @@ sub createFilesystem exit 127; } - # - # OK we have the command and the filesystem. Create it. - # - logprint("\nCreating $fs filesystem on $image\n") unless ( $CONFIG{ 'dontformat' } ); + unless ( $CONFIG{ 'dontformat' } ) { + # + # OK we have the command and the filesystem. Create it. + # + logprint("\nCreating $fs filesystem on $image\n"); - $command .= " " . $image; + $command .= " " . $image; - runCommand($command) unless ( $CONFIG{ 'dontformat' } ); - logprint("Done\n") unless ( $CONFIG{ 'dontformat' } ); + runCommand($command); + logprint("Done\n"); + } }