summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/c/stuff.xs.pl4
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/partition_table/gpt.pm12
4 files changed, 16 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 4ec599045..d2bfdf634 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- diskdrake (GPT):
o fix retrieving LVM/RAID partition type
+ o fix tagging lvm/raid as "linux filesystem"
o fix tagging ntfs-3g as "linux filesystem"
o fix tagging swap as "linux filesystem"
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index e2ab22475..7f12bcc26 100755
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -122,6 +122,10 @@ PedPartitionFlag string_to_pedpartflag(char*type) {
PedPartitionFlag flag = 0;
if (!strcmp(type, "ESP")) {
flag = PED_PARTITION_ESP;
+ } else if (!strcmp(type, "LVM")) {
+ flag = PED_PARTITION_LVM;
+ } else if (!strcmp(type, "RAID")) {
+ flag = PED_PARTITION_RAID;
} else {
printf("set_partition_flag: unknown type");
}
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index e642174bd..99a64610a 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,6 @@
- GPT partitionning:
o fix retrieving LVM/RAID partition type
+ o fix tagging lvm/raid as "linux filesystem"
o fix tagging ntfs-3g as "linux filesystem"
o fix tagging swap as "linux filesystem"
- tell users to ignore Gtk3 warnings
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index dde111151..6b302017b 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -148,9 +148,17 @@ sub write {
local $part->{fs_type} = 'linux-swap(v1)' if isSwap($part->{fs_type});
local $part->{fs_type} = 'ntfs' if $part->{fs_type} eq 'ntfs-3g';
c::disk_add_partition($hd->{file}, $o_start, $o_size, $part->{fs_type}) or die "failed to add partition #$part_number on $hd->{file}";
+ my $flag;
if (isESP($part)) {
- c::set_partition_flag($hd->{file}, $part_number, 'ESP')
- or die "failed to set type for $part->{file} on $part->{mntpoint}";
+ $flag = 'ESP';
+ } elsif (isRawLVM($part)) {
+ $flag = 'LVM';
+ } elsif (isRawRAID($part)) {
+ $flag = 'RAID';
+ }
+ if ($flag) {
+ c::set_partition_flag($hd->{file}, $part_number, $flag)
+ or die "failed to set type for $part->{file} on $part->{mntpoint}";
}
} elsif ($action eq 'del' && !$partitions_killed) {
c::disk_del_partition($hd->{file}, $part_number) or die "failed to del partition #$part_number on $hd->{file}";