From 4458a8a8985d3c7c66588ff1cf0748178ad23c17 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 23 Jul 2004 04:11:20 +0000 Subject: replace pt_type2name($part->{pt_type}) with part2name($part) (hoisting the dereferencing {pt_type}) --- perl-install/diskdrake/hd_gtk.pm | 2 +- perl-install/diskdrake/interactive.pm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 8ec9e80be..8479c3f3e 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -292,7 +292,7 @@ sub create_buttons4partitions { last; } }); - $w->set_name("PART_" . pt_type2name($entry->{pt_type})); + $w->set_name("PART_" . part2name($entry)); $w->set_size_request($entry->{size} * $ratio + $minwidth, 0); gtkpack__($kind->{display_box}, $w); $w->grab_focus if $current_entry && fsedit::are_same_partitions($current_entry, $entry); diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index fb2676114..f4e73c885 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -460,7 +460,7 @@ sub Create { #- including one less sector for start due to a capacity to increase the adjustement by #- one. my ($primaryOrExtended, $migrate_files); - my $type_name = pt_type2name($part->{pt_type}); + my $type_name = part2name($part); my $mb_size = $part->{size} >> 11; my $has_startsector = ($::expert || arch() !~ /i.86/) && !isLVM($hd); @@ -566,7 +566,7 @@ sub Type { #- when readonly, Type() is allowed only when changing between various { 0x83, 0x183, ... } @types = grep { (name2pt_type($_) & 0xff) == 0x83 } @types if $hd->{readonly}; - my $type_name = pt_type2name($part->{pt_type}); + my $type_name = part2name($part); $in->ask_from_({ title => N("Change partition type"), messages => N("Which filesystem do you want?"), focus_first => 1, @@ -874,7 +874,7 @@ sub Loopback { } delete $part->{mntpoint}; # we don't want the suggested mntpoint - my $type_name = pt_type2name($part->{pt_type}); + my $type_name = part2name($part); my $mb_size = $part->{size} >> 11; $in->ask_from(N("Loopback"), '', [ { label => N("Loopback file name: "), val => \$part->{loopback_file} }, @@ -1166,7 +1166,7 @@ sub format_part_info { $info .= N("Name: ") . $new_value . "\n"; } } elsif ($part->{pt_type}) { - my $type_name = substr(pt_type2name($part->{pt_type}), 0, 40); # limit the length + my $type_name = substr(part2name($part), 0, 40); # limit the length $info .= N("Type: ") . $type_name . ($::expert ? sprintf " (0x%x)", $part->{pt_type} : '') . "\n"; } else { $info .= N("Empty") . "\n"; @@ -1232,7 +1232,7 @@ sub format_raw_hd_info { $info .= N("Mount point: ") . "$raw_hd->{mntpoint}\n" if $raw_hd->{mntpoint}; $info .= format_hd_info($raw_hd); if ($raw_hd->{pt_type}) { - my $type_name = substr(pt_type2name($raw_hd->{pt_type}), 0, 40); # limit the length + my $type_name = substr(part2name($raw_hd), 0, 40); # limit the length $info .= N("Type: ") . $type_name . "\n"; } if (my $s = $raw_hd->{options}) { -- cgit v1.2.1