summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-16 16:26:26 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-16 16:26:26 +0100
commit24b7979ea25cbe5f08494cc4580c1341e78e090e (patch)
treec34e5d84f7cf51cd69dd56786b5b0396d7350bd0
parentd69a03e44832d8a8da84696bd4e2aaf3cd5d6cff (diff)
downloadlibguestfs-24b7979ea25cbe5f08494cc4580c1341e78e090e.tar.gz
libguestfs-24b7979ea25cbe5f08494cc4580c1341e78e090e.tar.xz
libguestfs-24b7979ea25cbe5f08494cc4580c1341e78e090e.zip
virt-make-fs: Recognize "msdos" as a partition or filesystem type.
Set MBR partition type byte accordingly.
-rwxr-xr-xtools/virt-make-fs8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/virt-make-fs b/tools/virt-make-fs
index a4da3f22..0cb2a10a 100755
--- a/tools/virt-make-fs
+++ b/tools/virt-make-fs
@@ -438,8 +438,12 @@ eval {
# Set the partition type byte if it's MBR and the filesystem
# type is one that we know about.
my $mbr_id;
- if ($partition eq "mbr") {
- if ($type =~ /^v?fat$/) {
+ if ($partition eq "mbr" || $partition eq "msdos") {
+ if ($type eq "msdos") {
+ # According to Wikipedia. However I have not actually
+ # tried this.
+ $mbr_id = 0x1;
+ } elsif ($type =~ /^v?fat$/) {
$mbr_id = 0xb;
} elsif ($type eq "ntfs") {
$mbr_id = 0x7;