From 16a626a8e859ec223ea53402fb8605cb8af13ee8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 25 Nov 2004 12:50:45 +0000 Subject: use fs::get::device2part() --- perl-install/standalone/diskdrake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'perl-install/standalone/diskdrake') diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 77d30bedc..fd4011966 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -83,9 +83,8 @@ $all_hds->{current_fstab} = fs::fstab_to_string($all_hds, ''); if ($type eq 'list-hd') { print partition_table::description($_), "\n" foreach fs::get::fstab($all_hds); } elsif ($type eq 'change-geometry') { - $para =~ s|^/dev/||; my ($device, undef, $heads, $sectors) = $para =~ /(.+)=(\d+,)?(\d+),(\d+)$/ or die "usage: diskdrake --change-geometry==[,],\n"; - my $hd = find { $_->{device} eq $device } @{$all_hds->{hds}}; + my $hd = fs::get::device2part($device, $all_hds->{hds}); put_in_hash($hd->{geom}, { heads => $heads, sectors => $sectors }); $hd->{isDirty} = 1; partition_table::write($hd); -- cgit v1.2.1