summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-10 13:20:52 +0100
committerRichard Jones <rjones@redhat.com>2010-04-10 13:41:10 +0100
commite323d93ed2ab3b55885273ab6bd911e2996346d9 (patch)
tree2ed75760c7b53deac790f169bd26b70abef9f5b2
parentd1dd00606d0b5b1430598e5092b017aa15d9ee11 (diff)
downloadlibguestfs-e323d93ed2ab3b55885273ab6bd911e2996346d9.tar.gz
libguestfs-e323d93ed2ab3b55885273ab6bd911e2996346d9.tar.xz
libguestfs-e323d93ed2ab3b55885273ab6bd911e2996346d9.zip
virt-make-fs: Use Sys::Guestfs::Lib::feature_available helper function.
-rwxr-xr-xtools/virt-make-fs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/virt-make-fs b/tools/virt-make-fs
index 54c5a1dc..74de4dee 100755
--- a/tools/virt-make-fs
+++ b/tools/virt-make-fs
@@ -20,6 +20,7 @@ use warnings;
use strict;
use Sys::Guestfs;
+use Sys::Guestfs::Lib qw(feature_available);
use Pod::Usage;
use Getopt::Long;
@@ -407,8 +408,8 @@ eval {
$g->add_drive ($output);
$g->launch ();
- if ($type eq "ntfs") {
- $g->available ([ "ntfs3g" ]);
+ if ($type eq "ntfs" && !feature_available ($g, "ntfs3g", "ntfsprogs")) {
+ die __"virt-make-fs: NTFS support was disabled when libguestfs was compiled\n"
}
# Partition the disk.