aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch/linux/common/usb.h
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2008-05-24 13:27:57 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2008-05-24 13:27:57 +0000
commitac1d892607eb0e94a3ee7c8b900aed62791df73c (patch)
treed24ea7552835004aa08365d25f351b40c2687a76 /hardinfo2/arch/linux/common/usb.h
parent47008902ec4a72dba45a5f57098e68785564dc48 (diff)
Cleanups.
Add wireless operation mode, wireless transmission power.
Diffstat (limited to 'hardinfo2/arch/linux/common/usb.h')
-rw-r--r--hardinfo2/arch/linux/common/usb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/hardinfo2/arch/linux/common/usb.h b/hardinfo2/arch/linux/common/usb.h
index 9e6980fe..a102e6d0 100644
--- a/hardinfo2/arch/linux/common/usb.h
+++ b/hardinfo2/arch/linux/common/usb.h
@@ -98,16 +98,16 @@ void __scan_usb_sysfs(void)
const gchar *sysfs_path = "/sys/class/usb_endpoint";
gint usb_device_number = 0;
+ if (!(sysfs = g_dir_open(sysfs_path, 0, NULL))) {
+ return;
+ }
+
if (usb_list) {
g_hash_table_foreach_remove(moreinfo, remove_usb_devices, NULL);
g_free(usb_list);
}
usb_list = g_strdup("[USB Devices]\n");
- if (!(sysfs = g_dir_open(sysfs_path, 0, NULL))) {
- return;
- }
-
while ((filename = (gchar *) g_dir_read_name(sysfs))) {
gchar *endpoint =
g_build_filename(sysfs_path, filename, "device", NULL);