libguestfs/0001-virt-make-fs-In-debug-mode-print-qemu-img-command-li.patch

27 lines
814 B
Diff

From 29b3ffdad5d6774f988fd0e25f9c8242e5dd577a Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Fri, 4 Mar 2011 12:13:12 +0000
Subject: [PATCH 1/2] virt-make-fs: In debug mode, print qemu-img command line.
---
tools/virt-make-fs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/virt-make-fs b/tools/virt-make-fs
index 854cc08..3825f70 100755
--- a/tools/virt-make-fs
+++ b/tools/virt-make-fs
@@ -397,6 +397,9 @@ if (!defined $size) {
# Take the unusual step of invoking qemu-img here.
my @cmd = ("qemu-img", "create", "-f", $format, $output, $size);
+if ($debug) {
+ print STDERR ("running: ", join (" ", @cmd), "\n");
+}
system (@cmd) == 0 or
die __"qemu-img create: failed to create disk image, see earlier error messages\n";
--
1.7.4