diff options
author | Márton Németh <nm127@freemail.hu> | 2009-11-23 11:26:38 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-23 11:50:52 -0500 |
commit | 6236dfaa908d9e9c84a8c4d029f443104ed2c47f (patch) | |
tree | 82874a5400d31459416b10ed26ce59354284b78d | |
parent | 52ce4eaa389eaac01876a4c1b6cacee15005b010 (diff) |
Input: do not overwrite the first part of phys string
Use strlcat() to append a string to the previously created first part.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/hid/usbhid/usbkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/ati_remote.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/powermate.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index b342926dd7fc..f843443ba5c3 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c | |||
@@ -266,7 +266,7 @@ static int usb_kbd_probe(struct usb_interface *iface, | |||
266 | le16_to_cpu(dev->descriptor.idProduct)); | 266 | le16_to_cpu(dev->descriptor.idProduct)); |
267 | 267 | ||
268 | usb_make_path(dev, kbd->phys, sizeof(kbd->phys)); | 268 | usb_make_path(dev, kbd->phys, sizeof(kbd->phys)); |
269 | strlcpy(kbd->phys, "/input0", sizeof(kbd->phys)); | 269 | strlcat(kbd->phys, "/input0", sizeof(kbd->phys)); |
270 | 270 | ||
271 | input_dev->name = kbd->name; | 271 | input_dev->name = kbd->name; |
272 | input_dev->phys = kbd->phys; | 272 | input_dev->phys = kbd->phys; |
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c index e290fde35e74..614b65d78fe9 100644 --- a/drivers/input/misc/ati_remote.c +++ b/drivers/input/misc/ati_remote.c | |||
@@ -766,7 +766,7 @@ static int ati_remote_probe(struct usb_interface *interface, const struct usb_de | |||
766 | ati_remote->interface = interface; | 766 | ati_remote->interface = interface; |
767 | 767 | ||
768 | usb_make_path(udev, ati_remote->phys, sizeof(ati_remote->phys)); | 768 | usb_make_path(udev, ati_remote->phys, sizeof(ati_remote->phys)); |
769 | strlcpy(ati_remote->phys, "/input0", sizeof(ati_remote->phys)); | 769 | strlcat(ati_remote->phys, "/input0", sizeof(ati_remote->phys)); |
770 | 770 | ||
771 | if (udev->manufacturer) | 771 | if (udev->manufacturer) |
772 | strlcpy(ati_remote->name, udev->manufacturer, sizeof(ati_remote->name)); | 772 | strlcpy(ati_remote->name, udev->manufacturer, sizeof(ati_remote->name)); |
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index a53c4885fbad..668913d12044 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -338,7 +338,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i | |||
338 | pm->input = input_dev; | 338 | pm->input = input_dev; |
339 | 339 | ||
340 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); | 340 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); |
341 | strlcpy(pm->phys, "/input0", sizeof(pm->phys)); | 341 | strlcat(pm->phys, "/input0", sizeof(pm->phys)); |
342 | 342 | ||
343 | spin_lock_init(&pm->lock); | 343 | spin_lock_init(&pm->lock); |
344 | 344 | ||