From d5d9ceee8b56a10761e207ad9970ebf704fc46e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 24 May 2012 14:40:52 +0100 Subject: [PATCH] virt-make-fs: When writing vfat, add utf8 option to mount (RHBZ#823885). --- tools/virt-make-fs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/virt-make-fs b/tools/virt-make-fs index 072a517ce8..7d032804f6 100755 --- a/tools/virt-make-fs +++ b/tools/virt-make-fs @@ -472,7 +472,16 @@ eval { } else { $g->mkfs_btrfs ([$dev], datatype => "single", metadata => "single"); } - $g->mount ($dev, "/"); + + # Mount it. + + # For vfat, add the utf8 mount option because we want to be able + # to encode any non-ASCII characters into UCS2 which is what + # modern vfat uses on disk (RHBZ#823885). + my $options = ""; + $options = "utf8" if $type eq "vfat"; + + $g->mount_options ($options, $dev, "/"); # Copy the data in. my $ifile;