linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
       [not found] <CANg8OWLDxZTrhJ-M2aeLdV-+y0VuGR+3iro179V=LLTeeQi_CA@mail.gmail.com>
@ 2012-09-05 22:38 ` Arnaldo Carvalho de Melo
  2012-09-08  0:17   ` Irina Tirdea
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 22:38 UTC (permalink / raw)
  To: Irina Tirdea
  Cc: Steven Rostedt, Ingo Molnar, LKML, Namhyung Kim, Peter Zijlstra,
	Frederic Weisbecker

Em Wed, Aug 29, 2012 at 01:06:04AM +0300, Irina Tirdea escreveu:
>    mempcpy is not supported by bionic in Android
>    and will lead to compilation errors.
> 
>    Replacing mempcpy with memcpy so it will work in Android.
> 
>    Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
>    ---
>     tools/perf/util/target.c |    4 ++--
>     1 file changed, 2 insertions(+), 2 deletions(-)
> 
>    diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
>    index 051eaa6..065528b 100644
>    --- a/tools/perf/util/target.c
>    +++ b/tools/perf/util/target.c
>    @@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target,
>    int errnum,
>     
>             if (err != buf) {
>                 size_t len = strlen(err);
>    -            char *c = mempcpy(buf, err, min(buflen - 1, len));
>    -            *c = '\0';
>    +            memcpy(buf, err, min(buflen - 1, len));
>    +            *(buf + min(buflen - 1, len)) = '\0';
>             }
>     

Can you resubmit this in txt form? I applied some other patches from you
but  you need to try to do it yourself, i.e. send just to you, then try
to save the patch and apply it...

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-09-05 22:38 ` [PATCH 11/13] perf tools: replace mempcpy with memcpy Arnaldo Carvalho de Melo
@ 2012-09-08  0:17   ` Irina Tirdea
  0 siblings, 0 replies; 5+ messages in thread
From: Irina Tirdea @ 2012-09-08  0:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Steven Rostedt, Ingo Molnar, LKML, Namhyung Kim, Peter Zijlstra,
	Frederic Weisbecker

>
> Can you resubmit this in txt form? I applied some other patches from you
> but  you need to try to do it yourself, i.e. send just to you, then try
> to save the patch and apply it...

Sorry about this... I will check this myself from now on.
I've seen you already merged this one, but I'll resubmit the others
and make sure they apply properly.

Thanks,
Irina

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-09-03  1:09 ` Namhyung Kim
@ 2012-09-03 20:59   ` Irina Tirdea
  0 siblings, 0 replies; 5+ messages in thread
From: Irina Tirdea @ 2012-09-03 20:59 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar, LKML,
	Peter Zijlstra, Frederic Weisbecker

On Mon, Sep 3, 2012 at 4:09 AM, Namhyung Kim <namhyung@kernel.org> wrote:
> On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote:
>> mempcpy is not supported by bionic in Android
>> and will lead to compilation errors.
>>
>> Replacing mempcpy with memcpy so it will work in Android.
>
> Unfortunately I've added another instance of the mempcpy in a
> libtraceevent code. :-/
>

Thanks for the heads-up. I'll fix it.

Irina

> Thanks,
> Namhyung
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-08-28 22:22 Irina Tirdea
@ 2012-09-03  1:09 ` Namhyung Kim
  2012-09-03 20:59   ` Irina Tirdea
  0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2012-09-03  1:09 UTC (permalink / raw)
  To: Irina Tirdea
  Cc: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar, LKML,
	Peter Zijlstra, Frederic Weisbecker

On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote:
> mempcpy is not supported by bionic in Android
> and will lead to compilation errors.
>
> Replacing mempcpy with memcpy so it will work in Android.

Unfortunately I've added another instance of the mempcpy in a
libtraceevent code. :-/

Thanks,
Namhyung


>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
>  tools/perf/util/target.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
> index 051eaa6..065528b 100644
> --- a/tools/perf/util/target.c
> +++ b/tools/perf/util/target.c
> @@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target
> *target, int errnum,
>
>  		if (err != buf) {
>  			size_t len = strlen(err);
> -			char *c = mempcpy(buf, err, min(buflen - 1, len));
> -			*c = '\0';
> +			memcpy(buf, err, min(buflen - 1, len));
> +			*(buf + min(buflen - 1, len)) = '\0';
>  		}
>
>  		return 0;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 11/13] perf tools: replace mempcpy with memcpy
@ 2012-08-28 22:22 Irina Tirdea
  2012-09-03  1:09 ` Namhyung Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Irina Tirdea @ 2012-08-28 22:22 UTC (permalink / raw)
  To: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: LKML, Namhyung Kim, Peter Zijlstra, Frederic Weisbecker

mempcpy is not supported by bionic in Android
and will lead to compilation errors.

Replacing mempcpy with memcpy so it will work in Android.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
---
 tools/perf/util/target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 051eaa6..065528b 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target
*target, int errnum,

 		if (err != buf) {
 			size_t len = strlen(err);
-			char *c = mempcpy(buf, err, min(buflen - 1, len));
-			*c = '\0';
+			memcpy(buf, err, min(buflen - 1, len));
+			*(buf + min(buflen - 1, len)) = '\0';
 		}

 		return 0;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-08  0:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CANg8OWLDxZTrhJ-M2aeLdV-+y0VuGR+3iro179V=LLTeeQi_CA@mail.gmail.com>
2012-09-05 22:38 ` [PATCH 11/13] perf tools: replace mempcpy with memcpy Arnaldo Carvalho de Melo
2012-09-08  0:17   ` Irina Tirdea
2012-08-28 22:22 Irina Tirdea
2012-09-03  1:09 ` Namhyung Kim
2012-09-03 20:59   ` Irina Tirdea

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).