linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Németh Márton" <nm127@freemail.hu>, "Jiri Kosina" <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] do not overwrite the first part of phys string
Date: Mon, 23 Nov 2009 08:08:41 -0800	[thread overview]
Message-ID: <20091123160841.GA3491@core.coreip.homeip.net> (raw)
In-Reply-To: <4B079CE0.60604@freemail.hu>

Jiri,

Do you want to split out usbkbd section or do you want me to pick up
everything?

Thanks.

On Sat, Nov 21, 2009 at 08:55:12AM +0100, Németh Márton wrote:
> From: Márton Németh <nm127@freemail.hu>
> 
> Use strlcat() to append a string to the previously created first part.
> 
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> diff -upr linux-2.6.32-rc7.orig/drivers/hid/usbhid/usbkbd.c linux-2.6.32-rc7/drivers/hid/usbhid/usbkbd.c
> --- linux-2.6.32-rc7.orig/drivers/hid/usbhid/usbkbd.c	2009-09-10 00:13:59.000000000 +0200
> +++ linux-2.6.32-rc7/drivers/hid/usbhid/usbkbd.c	2009-11-21 08:48:32.000000000 +0100
> @@ -266,7 +266,7 @@ static int usb_kbd_probe(struct usb_inte
>  			 le16_to_cpu(dev->descriptor.idProduct));
> 
>  	usb_make_path(dev, kbd->phys, sizeof(kbd->phys));
> -	strlcpy(kbd->phys, "/input0", sizeof(kbd->phys));
> +	strlcat(kbd->phys, "/input0", sizeof(kbd->phys));
> 
>  	input_dev->name = kbd->name;
>  	input_dev->phys = kbd->phys;
> diff -upr linux-2.6.32-rc7.orig/drivers/input/misc/ati_remote.c linux-2.6.32-rc7/drivers/input/misc/ati_remote.c
> --- linux-2.6.32-rc7.orig/drivers/input/misc/ati_remote.c	2009-09-10 00:13:59.000000000 +0200
> +++ linux-2.6.32-rc7/drivers/input/misc/ati_remote.c	2009-11-21 08:48:50.000000000 +0100
> @@ -766,7 +766,7 @@ static int ati_remote_probe(struct usb_i
>  	ati_remote->interface = interface;
> 
>  	usb_make_path(udev, ati_remote->phys, sizeof(ati_remote->phys));
> -	strlcpy(ati_remote->phys, "/input0", sizeof(ati_remote->phys));
> +	strlcat(ati_remote->phys, "/input0", sizeof(ati_remote->phys));
> 
>  	if (udev->manufacturer)
>  		strlcpy(ati_remote->name, udev->manufacturer, sizeof(ati_remote->name));
> diff -upr linux-2.6.32-rc7.orig/drivers/input/misc/powermate.c linux-2.6.32-rc7/drivers/input/misc/powermate.c
> --- linux-2.6.32-rc7.orig/drivers/input/misc/powermate.c	2009-09-10 00:13:59.000000000 +0200
> +++ linux-2.6.32-rc7/drivers/input/misc/powermate.c	2009-11-21 08:48:44.000000000 +0100
> @@ -338,7 +338,7 @@ static int powermate_probe(struct usb_in
>  	pm->input = input_dev;
> 
>  	usb_make_path(udev, pm->phys, sizeof(pm->phys));
> -	strlcpy(pm->phys, "/input0", sizeof(pm->phys));
> +	strlcat(pm->phys, "/input0", sizeof(pm->phys));
> 
>  	spin_lock_init(&pm->lock);
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-11-23 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21  7:55 [PATCH] do not overwrite the first part of phys string Németh Márton
2009-11-23 16:08 ` Dmitry Torokhov [this message]
2009-11-23 16:11   ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091123160841.GA3491@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm127@freemail.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).