summaryrefslogtreecommitdiffstats
path: root/libusbhost
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-12-15 12:58:04 -0800
committerMike Lockwood <lockwood@android.com>2010-12-15 12:58:04 -0800
commit93aff72d9b469f4b77468bab654cd65243b662e6 (patch)
treed9a23c86131fa5016714d3bae5a6c14bf1f3dcfb /libusbhost
parentee878753f915a0176ea411b71bdffde064e24ae0 (diff)
downloadsystem_core-93aff72d9b469f4b77468bab654cd65243b662e6.zip
system_core-93aff72d9b469f4b77468bab654cd65243b662e6.tar.gz
system_core-93aff72d9b469f4b77468bab654cd65243b662e6.tar.bz2
libusbhost: Fix breakage due to not storing dev_name in struct usb_device
Change-Id: Iefac9b31f900edb2dbd594f9eff9113b2038757d Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'libusbhost')
-rw-r--r--libusbhost/usbhost.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c
index 6bdeebf..dba0b48 100644
--- a/libusbhost/usbhost.c
+++ b/libusbhost/usbhost.c
@@ -259,6 +259,7 @@ struct usb_device *usb_device_new(const char *dev_name, int fd)
if (length < 0)
goto failed;
+ strncpy(device->dev_name, dev_name, sizeof(device->dev_name) - 1);
device->fd = fd;
device->desc_length = length;
// assume we are writeable, since usb_device_get_fd will only return writeable fds