diff options
author | Ondrej Čerman <ondrej.cerman@gmail.com> | 2019-07-20 23:07:56 +0200 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-07-29 19:44:04 -0700 |
commit | 5f620001a8f9017449d15b1a4aafdb9a61a44d4d (patch) | |
tree | 1900083d1506905f6dbe4af523f5351f656dc599 /includes | |
parent | 08a74ce10aedafd1a9e2f3c411e5eeea3658f71d (diff) |
usb: added info from sysfs
Diffstat (limited to 'includes')
-rw-r--r-- | includes/hardinfo.h | 1 | ||||
-rw-r--r-- | includes/usb_util.h | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/includes/hardinfo.h b/includes/hardinfo.h index 8888565f..6b9e33af 100644 --- a/includes/hardinfo.h +++ b/includes/hardinfo.h @@ -163,6 +163,7 @@ gchar *module_call_method_param(gchar * method, gchar * parameter); /* Sysfs stuff */ gfloat h_sysfs_read_float(const gchar *endpoint, const gchar *entry); gint h_sysfs_read_int(const gchar *endpoint, const gchar *entry); +gint h_sysfs_read_hex(const gchar *endpoint, const gchar *entry); gchar *h_sysfs_read_string(const gchar *endpoint, const gchar *entry); #define SCAN_START() static gboolean scanned = FALSE; if (reload) scanned = FALSE; if (scanned) return; diff --git a/includes/usb_util.h b/includes/usb_util.h index 5f7ba47c..2d1398ba 100644 --- a/includes/usb_util.h +++ b/includes/usb_util.h @@ -25,6 +25,8 @@ typedef struct usbd { int vendor_id, product_id; char *vendor; char *product; + char *manufacturer; + char *device; int dev_class; int dev_subclass; @@ -36,7 +38,7 @@ typedef struct usbd { int max_curr_ma; - int speed_mbs; /* TODO: */ + int speed_mbs; gboolean user_scan; /* not scanned as root */ struct usbi *if_list; @@ -53,6 +55,7 @@ typedef struct usbi { char *if_class_str; char *if_subclass_str; char *if_protocol_str; + char *driver; struct usbi *next; } usbi; @@ -61,7 +64,7 @@ usbd *usb_get_device_list(); int usbd_list_count(usbd *); void usbd_list_free(usbd *); -usbd *usb_get_device(int bus, int dev); +usbd *usb_get_device(int bus, int dev, const gchar* sysfspath); void usbd_free(usbd *); #endif |