Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Márton Németh and committed by
Dmitry Torokhov
6236dfaa 52ce4eaa

+3 -3
+1 -1
drivers/hid/usbhid/usbkbd.c
··· 266 266 le16_to_cpu(dev->descriptor.idProduct)); 267 267 268 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 271 input_dev->name = kbd->name; 272 272 input_dev->phys = kbd->phys;
+1 -1
drivers/input/misc/ati_remote.c
··· 766 766 ati_remote->interface = interface; 767 767 768 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 771 if (udev->manufacturer) 772 772 strlcpy(ati_remote->name, udev->manufacturer, sizeof(ati_remote->name));
+1 -1
drivers/input/misc/powermate.c
··· 338 338 pm->input = input_dev; 339 339 340 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 343 spin_lock_init(&pm->lock); 344 344