summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2008-12-12 10:10:51 -0200
committerLeandro A. F. Pereira <leandro@hardinfo.org>2008-12-12 10:10:51 -0200
commit8d78d9eba41d8dcec2c67d4b87ef093fdb716da2 (patch)
treee92613c36e9cdec2547ce4abcabbe56bdfbfe96e
parent1a7d469e36575e31b298e49a3342495ef0f52fcf (diff)
Corrections if phys.address isn't available (patch by Andrey Esin)
-rw-r--r--hardinfo2/arch/linux/common/inputdevices.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/hardinfo2/arch/linux/common/inputdevices.h b/hardinfo2/arch/linux/common/inputdevices.h
index 8b0b7595..e89e4b7e 100644
--- a/hardinfo2/arch/linux/common/inputdevices.h
+++ b/hardinfo2/arch/linux/common/inputdevices.h
@@ -115,10 +115,14 @@ __scan_input_devices(void)
}
strhash = h_strdup_cprintf("Product=0x%x\n"
- "Version=0x%x\n"
- "Connected to=%s\n",
- strhash, product, version, phys);
+ "Version=0x%x\n",
+ strhash, product, version);
+ if (phis[1] != 0) {
+ strhash = h_strdup_cprintf("Connected to=%s\n",
+ strhash, phys);
+ }
+
if (strstr(phys,"ir")) {
strhash = h_strdup_cprintf("InfraRed port=yes\n",
strhash);