summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>2009-11-25 12:02:56 +0000
committerHerton Ronaldo Krzesinski <herton@mandriva.com.br>2009-11-25 12:02:56 +0000
commitff576c1833b7705dedd7e32c93700b30f2957853 (patch)
treed6e66797bf2bd9d90fb57c49eb8e609b4aa97f74
parentdb8c082d090e2f751c326a16a5b265d702de6739 (diff)
downloaddrakx-backup-do-not-use-ff576c1833b7705dedd7e32c93700b30f2957853.tar
drakx-backup-do-not-use-ff576c1833b7705dedd7e32c93700b30f2957853.tar.gz
drakx-backup-do-not-use-ff576c1833b7705dedd7e32c93700b30f2957853.tar.bz2
drakx-backup-do-not-use-ff576c1833b7705dedd7e32c93700b30f2957853.tar.xz
drakx-backup-do-not-use-ff576c1833b7705dedd7e32c93700b30f2957853.zip
update drakx to get proper sysfs device path from usb devices
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/c/stuff.xs.pl4
-rw-r--r--perl-install/detect_devices.pm4
3 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index bf8fd80cc..8cf35630b 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- devices detection:
o fix reading USB details (#55690)
o fix SCSI driver module name
+ o fix sysfs device path from usb devices
- partitioning wizard:
o unmount swap too when unmounting all partitions
o do not suggest Windows mountpoint for mounted partitions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 0f4908d9b..dda429f8b 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -281,8 +281,8 @@ usb_probe()
for (i = 0; i < entries.nb; i++) {
struct pciusb_entry *e = &entries.entries[i];
struct usb_class_text class_text = usb_class2text(e->class_id);
- snprintf(buf, sizeof(buf), "%04x\t%04x\t%s|%s|%s\t%s\t%s\t%d\t%d",
- e->vendor, e->device, class_text.usb_class_text, class_text.usb_sub_text, class_text.usb_prot_text, e->module ? e->module : "unknown", e->text, e->pci_bus, e->pci_device);
+ snprintf(buf, sizeof(buf), "%04x\t%04x\t%s|%s|%s\t%s\t%s\t%d\t%d\t%d",
+ e->vendor, e->device, class_text.usb_class_text, class_text.usb_sub_text, class_text.usb_prot_text, e->module ? e->module : "unknown", e->text, e->pci_bus, e->pci_device, e->usb_port);
PUSHs(sv_2mortal(newSVpv(buf, 0)));
}
pciusb_free(&entries);
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 0057ec937..62151b65a 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -835,10 +835,10 @@ sub usb_probe__real() {
add_addons($usbtable_addons, map {
my %l;
- @l{qw(vendor id media_type driver description pci_bus pci_device)} = split "\t";
+ @l{qw(vendor id media_type driver description pci_bus pci_device usb_port)} = split "\t";
$l{media_type} = join('|', grep { $_ ne '(null)' } split('\|', $l{media_type}));
$l{$_} = hex $l{$_} foreach qw(vendor id);
- $l{sysfs_device} = "/sys/class/usb_device/usbdev$l{pci_bus}.$l{pci_device}/device";
+ $l{sysfs_device} = "/sys/bus/usb/devices/$l{pci_bus}-" . ($l{usb_port} + 1);
$l{bus} = 'USB';
\%l;
} c::usb_probe());