diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-03-27 08:19:29 -0400 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2015-03-27 22:32:45 +0159 |
commit | 6c8f2cc5e29445140ccdc29d04bf3876d545f16a (patch) | |
tree | 366e05eace2a84000dcb470235d4e18372f7e793 /perl-install | |
parent | 8ec5cb448e1d5ad539c2ee5caf25e67f20d63391 (diff) | |
download | drakx-6c8f2cc5e29445140ccdc29d04bf3876d545f16a.tar drakx-6c8f2cc5e29445140ccdc29d04bf3876d545f16a.tar.gz drakx-6c8f2cc5e29445140ccdc29d04bf3876d545f16a.tar.bz2 drakx-6c8f2cc5e29445140ccdc29d04bf3876d545f16a.tar.xz drakx-6c8f2cc5e29445140ccdc29d04bf3876d545f16a.zip |
make it more generic
just bind the libparted function (needed for next commit)
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/c/stuff.xs.pl | 6 | ||||
-rw-r--r-- | perl-install/partition_table/gpt.pm | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 95e0c0411..e2ab22475 100755 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -587,7 +587,7 @@ get_iso_volume_ids(int fd) print ' int -is_partition_ESP(char * device_path, int part_number) +get_partition_flag(char * device_path, int part_number, char *type) CODE: PedDevice *dev = ped_device_get(device_path); RETVAL = 0; @@ -598,7 +598,9 @@ is_partition_ESP(char * device_path, int part_number) if (!part) { printf("is_partition_ESP: failed to find partition\n"); } else { - RETVAL=ped_partition_get_flag(part, PED_PARTITION_ESP); + PedPartitionFlag flag = string_to_pedpartflag(type); + if (flag) + RETVAL=ped_partition_get_flag(part, flag); } ped_disk_destroy(disk); } diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index e59e96184..5de9337e3 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -111,7 +111,7 @@ sub read_one { # FIXME: just use '@pt = map { ... } c::...' if part_numbers are always linear: foreach (c::get_disk_partitions($hd->{file})) { # fix detecting ESP (special case are they're detected through pt_type): - if (c::is_partition_ESP($hd->{file}, $_->{part_number})) { + if (c::get_partition_flag($hd->{file}, $_->{part_number}, 'ESP')) { $_->{pt_type} = 0xef; } @pt[$_->{part_number}-1] = $_; |