From ac1d892607eb0e94a3ee7c8b900aed62791df73c Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 24 May 2008 13:27:57 +0000 Subject: Cleanups. Add wireless operation mode, wireless transmission power. --- hardinfo2/arch/linux/common/usb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hardinfo2/arch/linux/common/usb.h') 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); -- cgit v1.2.3