summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-09-23 18:50:12 +0000
committerThierry Vignaud <tv@mandriva.org>2009-09-23 18:50:12 +0000
commit1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2 (patch)
treed9227513a56e1f2cfd0ac236dc7550dfeedfd2aa /perl-install
parentb838f9a6ddbff0d666a02ce85bc03b003d4eedcc (diff)
downloaddrakx-backup-do-not-use-1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2.tar
drakx-backup-do-not-use-1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2.tar.gz
drakx-backup-do-not-use-1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2.tar.bz2
drakx-backup-do-not-use-1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2.tar.xz
drakx-backup-do-not-use-1f2f5e8a1e53e59e68aa38dd5205929e238a0eb2.zip
(get_pci_sysfs_path) extract it out of pci_probe__real() (needed for
later commits)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 672445fff..974008808 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -799,6 +799,12 @@ sub add_addons {
@l;
}
+sub get_pci_sysfs_path {
+ my ($l) = @_;
+ sprintf('%04x:%02x:%02x.%d', $l->{pci_domain}, $l->{pci_bus}, $l->{pci_device}, $l->{pci_function});
+}
+
+
my (@pci, @usb);
sub pci_probe__real() {
add_addons($pcitable_addons, map {
@@ -806,7 +812,7 @@ sub pci_probe__real() {
@l{qw(vendor id subvendor subid pci_domain pci_bus pci_device pci_function pci_revision media_type nice_media_type driver description)} = split "\t";
$l{$_} = hex $l{$_} foreach qw(vendor id subvendor subid);
$l{bus} = 'PCI';
- $l{sysfs_device} = sprintf('/sys/bus/pci/devices/%04x:%02x:%02x.%d', $l{pci_domain}, $l{pci_bus}, $l{pci_device}, $l{pci_function});
+ $l{sysfs_device} = '/sys/bus/pci/devices/' . get_pci_sysfs_path(\%l);
\%l;
} c::pci_probe());
}