diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device.c b/src/device.c index 27e25d5..99e0153 100644 --- a/src/device.c +++ b/src/device.c @@ -693,21 +693,21 @@ void device_set_visible(int device_id) } ENDFOREACH } -int device_get_count(void) +int device_get_count(int include_hidden) { int count = 0; FOREACH(struct mux_device *dev, &device_list) { - if((dev->state == MUXDEV_ACTIVE) && dev->visible) + if((dev->state == MUXDEV_ACTIVE) && (include_hidden || dev->visible)) count++; } ENDFOREACH return count; } -int device_get_list(struct device_info *p) +int device_get_list(int include_hidden, struct device_info *p) { int count = 0; FOREACH(struct mux_device *dev, &device_list) { - if((dev->state == MUXDEV_ACTIVE) && dev->visible) { + if((dev->state == MUXDEV_ACTIVE) && (include_hidden || dev->visible)) { p->id = dev->id; p->serial = usb_get_serial(dev->usbdev); p->location = usb_get_location(dev->usbdev); |