From 807a80de36216fa890531f1dfa61f79432096238 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 10 Jun 2004 14:57:17 +0000 Subject: - hde is ide/host1/bus0/target0/lun0, and not ide/host0/bus2/target0/lun0 - add host in hd struct for bus ide --- perl-install/detect_devices.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 97ae9eb66..034b60f23 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -329,12 +329,14 @@ sub getIDE() { if_($info =~ /^$_(-|\s)*(.*)/, $eide_hds{$_}, $2); } keys %eide_hds; - my ($channel, $id) = ($num / 2, $num % 2); - my $devfs_prefix = sprintf('ide/host0/bus%d/target%d/lun0', $channel, $id); + my $host = $num; + ($host, my $id) = divide($host, 2); + ($host, my $channel) = divide($host, 2); + my $devfs_prefix = sprintf('ide/host%d/bus%d/target%d/lun0', $host, $channel, $id); push @idi, { media_type => $type, device => basename($d), devfs_prefix => $devfs_prefix, - info => $info, channel => $channel, id => $id, bus => 'ide', + info => $info, host => $host, channel => $channel, id => $id, bus => 'ide', if_($vendor, Vendor => $vendor), if_($model, Model => $model) }; } get_devfs_devices(@idi); -- cgit v1.2.1