summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-12 02:04:40 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 23:53:11 +0100
commit67b622f09f4d4da532a0223b43b586cf716d92ec (patch)
tree3734231ed9a3b3243330433140dfedeb96017b47 /perl-install/c
parent70abfb7f80bf666a15d2469fb74f9a299384cee9 (diff)
downloaddrakx-67b622f09f4d4da532a0223b43b586cf716d92ec.tar
drakx-67b622f09f4d4da532a0223b43b586cf716d92ec.tar.gz
drakx-67b622f09f4d4da532a0223b43b586cf716d92ec.tar.bz2
drakx-67b622f09f4d4da532a0223b43b586cf716d92ec.tar.xz
drakx-67b622f09f4d4da532a0223b43b586cf716d92ec.zip
fix field types after commit 76082a819319
fix warnings about numeric comparisons with strings
Diffstat (limited to 'perl-install/c')
-rwxr-xr-xperl-install/c/stuff.xs.pl22
1 files changed, 11 insertions, 11 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index de4800529..7ef772975 100755
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -97,14 +97,14 @@ void log_perror(const char *msg) {
HV* common_pciusb_hash_init(struct pciusb_entry *e) {
HV *rh = (HV *)sv_2mortal((SV *)newHV());
- hv_store(rh, "vendor", 6, newSVnv(e->vendor), 0);
- hv_store(rh, "subvendor", 9, newSVnv(e->subvendor), 0);
- hv_store(rh, "id", 2, newSVnv(e->device), 0);
- hv_store(rh, "subid", 5, newSVnv(e->subdevice), 0);
+ hv_store(rh, "vendor", 6, newSViv(e->vendor), 0);
+ hv_store(rh, "subvendor", 9, newSViv(e->subvendor), 0);
+ hv_store(rh, "id", 2, newSViv(e->device), 0);
+ hv_store(rh, "subid", 5, newSViv(e->subdevice), 0);
hv_store(rh, "driver", 6, newSVpv(e->module ? e->module : "unknown", 0), 0);
hv_store(rh, "description", 11, newSVpv(e->text, 0), 0);
- hv_store(rh, "pci_bus", 7, newSVnv(e->pci_bus), 0);
- hv_store(rh, "pci_device", 10, newSVnv(e->pci_device), 0);
+ hv_store(rh, "pci_bus", 7, newSViv(e->pci_bus), 0);
+ hv_store(rh, "pci_device", 10, newSViv(e->pci_device), 0);
return rh;
}
@@ -281,10 +281,10 @@ pci_probe()
for (i = 0; i < entries.nb; i++) {
struct pciusb_entry *e = &entries.entries[i];
HV * rh = common_pciusb_hash_init(e);
- hv_store(rh, "pci_domain", 10, newSVnv(e->pci_domain), 0);
- hv_store(rh, "pci_function", 12, newSVnv(e->pci_function), 0);
- hv_store(rh, "pci_revision", 12, newSVnv(e->pci_revision), 0);
- hv_store(rh, "is_pciexpress", 13, newSVnv(e->is_pciexpress), 0);
+ hv_store(rh, "pci_domain", 10, newSViv(e->pci_domain), 0);
+ hv_store(rh, "pci_function", 12, newSViv(e->pci_function), 0);
+ hv_store(rh, "pci_revision", 12, newSViv(e->pci_revision), 0);
+ hv_store(rh, "is_pciexpress", 13, newSViv(e->is_pciexpress), 0);
hv_store(rh, "nice_media_type", 15, newSVpv(e->class, 0), 0);
hv_store(rh, "media_type", 10, newSVpv(pci_class2text(e->class_id), 0), 0);
PUSHs(newRV((SV *)rh));
@@ -304,7 +304,7 @@ usb_probe()
struct usb_class_text class_text = usb_class2text(e->class_id);
snprintf(buf, sizeof(buf), "%s|%s|%s", class_text.usb_class_text, class_text.usb_sub_text, class_text.usb_prot_text);
HV * rh = common_pciusb_hash_init(e);
- hv_store(rh, "usb_port", 8, newSVnv(e->usb_port), 0);
+ hv_store(rh, "usb_port", 8, newSViv(e->usb_port), 0);
hv_store(rh, "media_type", 10, newSVpv(buf, 0), 0);
PUSHs(newRV((SV *)rh));
}