From 8d78d9eba41d8dcec2c67d4b87ef093fdb716da2 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Fri, 12 Dec 2008 10:10:51 -0200 Subject: Corrections if phys.address isn't available (patch by Andrey Esin) --- hardinfo2/arch/linux/common/inputdevices.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'hardinfo2/arch/linux/common/inputdevices.h') 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); -- cgit v1.2.3