All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag
       [not found] <1390002463-21184-1-git-send-email-marc-andre.laperle@ericsson.com>
@ 2014-01-18  2:31 ` Simon Marchi
       [not found] ` <CAFXXi0nYX8xQAvDW+uox6bfx0ODa2Rdr4ex35pP8PmXotnMjyg@mail.gmail.com>
  2014-02-04 19:39 ` David Goulet
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Marchi @ 2014-01-18  2:31 UTC (permalink / raw)
  To: Marc-Andre Laperle; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1189 bytes --]

While you are at it, you could change the char fields as well, since char
is not exact-width either.


On 17 January 2014 18:47, Marc-Andre Laperle <
marc-andre.laperle@ericsson.com> wrote:

> This struct is meant to be sent over the network so members should be
> of exact-width.
>
> Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
> ---
>  src/bin/lttng-relayd/lttng-viewer.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bin/lttng-relayd/lttng-viewer.h
> b/src/bin/lttng-relayd/lttng-viewer.h
> index 1977a43..6330270 100644
> --- a/src/bin/lttng-relayd/lttng-viewer.h
> +++ b/src/bin/lttng-relayd/lttng-viewer.h
> @@ -100,7 +100,7 @@ struct lttng_viewer_session {
>  struct lttng_viewer_stream {
>         uint64_t id;
>         uint64_t ctf_trace_id;
> -       int metadata_flag;
> +       uint32_t metadata_flag;
>         char path_name[LTTNG_VIEWER_PATH_MAX];
>         char channel_name[LTTNG_VIEWER_NAME_MAX];
>  } __attribute__((__packed__));
> --
> 1.8.3.2
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>

[-- Attachment #1.2: Type: text/html, Size: 1839 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag
       [not found] ` <CAFXXi0nYX8xQAvDW+uox6bfx0ODa2Rdr4ex35pP8PmXotnMjyg@mail.gmail.com>
@ 2014-01-20 20:25   ` Marc-André Laperle
       [not found]   ` <D381217948BF4C45AF756AFC995BEB9F1C1A2A4D@eusaamb103.ericsson.se>
  1 sibling, 0 replies; 5+ messages in thread
From: Marc-André Laperle @ 2014-01-20 20:25 UTC (permalink / raw)
  To: Simon Marchi; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1783 bytes --]

I'm not sure that's possible. Whether I change them to uint8_t or int8_t, I get warnings because they get used with strncpy which wants char. Any idea how to solve this?

Marc-André

________________________________
From: thundersim@gmail.com [thundersim@gmail.com] on behalf of Simon Marchi [simon.marchi@polymtl.ca]
Sent: Friday, 17 January 2014 9:31 PM
To: Marc-André Laperle
Cc: lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag

While you are at it, you could change the char fields as well, since char is not exact-width either.


On 17 January 2014 18:47, Marc-Andre Laperle <marc-andre.laperle@ericsson.com<mailto:marc-andre.laperle@ericsson.com>> wrote:
This struct is meant to be sent over the network so members should be
of exact-width.

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com<mailto:marc-andre.laperle@ericsson.com>>
---
 src/bin/lttng-relayd/lttng-viewer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/lttng-relayd/lttng-viewer.h b/src/bin/lttng-relayd/lttng-viewer.h
index 1977a43..6330270 100644
--- a/src/bin/lttng-relayd/lttng-viewer.h
+++ b/src/bin/lttng-relayd/lttng-viewer.h
@@ -100,7 +100,7 @@ struct lttng_viewer_session {
 struct lttng_viewer_stream {
        uint64_t id;
        uint64_t ctf_trace_id;
-       int metadata_flag;
+       uint32_t metadata_flag;
        char path_name[LTTNG_VIEWER_PATH_MAX];
        char channel_name[LTTNG_VIEWER_NAME_MAX];
 } __attribute__((__packed__));
--
1.8.3.2


_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org<mailto:lttng-dev@lists.lttng.org>
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[-- Attachment #1.2: Type: text/html, Size: 3159 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag
       [not found]   ` <D381217948BF4C45AF756AFC995BEB9F1C1A2A4D@eusaamb103.ericsson.se>
@ 2014-01-30 22:54     ` Mathieu Desnoyers
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Desnoyers @ 2014-01-30 22:54 UTC (permalink / raw)
  To: Marc-André Laperle; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 2419 bytes --]

Using a char should be OK here. 

----- Original Message -----

> From: "Marc-André Laperle" <marc-andre.laperle@ericsson.com>
> To: "Simon Marchi" <simon.marchi@polymtl.ca>
> Cc: lttng-dev@lists.lttng.org
> Sent: Monday, January 20, 2014 3:25:07 PM
> Subject: Re: [lttng-dev] [PATCH] Use uint32_t for
> lttng_viewer_stream.metadata_flag

> I'm not sure that's possible. Whether I change them to uint8_t or int8_t, I
> get warnings because they get used with strncpy which wants char. Any idea
> how to solve this?

> Marc-André

> From: thundersim@gmail.com [thundersim@gmail.com] on behalf of Simon Marchi
> [simon.marchi@polymtl.ca]
> Sent: Friday, 17 January 2014 9:31 PM
> To: Marc-André Laperle
> Cc: lttng-dev@lists.lttng.org
> Subject: Re: [lttng-dev] [PATCH] Use uint32_t for
> lttng_viewer_stream.metadata_flag

> While you are at it, you could change the char fields as well, since char is
> not exact-width either.

> On 17 January 2014 18:47, Marc-Andre Laperle <
> marc-andre.laperle@ericsson.com > wrote:

> > This struct is meant to be sent over the network so members should be
> 
> > of exact-width.
> 

> > Signed-off-by: Marc-Andre Laperle < marc-andre.laperle@ericsson.com >
> 
> > ---
> 
> > src/bin/lttng-relayd/lttng-viewer.h | 2 +-
> 
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> 

> > diff --git a/src/bin/lttng-relayd/lttng-viewer.h
> > b/src/bin/lttng-relayd/lttng-viewer.h
> 
> > index 1977a43..6330270 100644
> 
> > --- a/src/bin/lttng-relayd/lttng-viewer.h
> 
> > +++ b/src/bin/lttng-relayd/lttng-viewer.h
> 
> > @@ -100,7 +100,7 @@ struct lttng_viewer_session {
> 
> > struct lttng_viewer_stream {
> 
> > uint64_t id;
> 
> > uint64_t ctf_trace_id;
> 
> > - int metadata_flag;
> 
> > + uint32_t metadata_flag;
> 
> > char path_name[LTTNG_VIEWER_PATH_MAX];
> 
> > char channel_name[LTTNG_VIEWER_NAME_MAX];
> 
> > } __attribute__((__packed__));
> 
> > --
> 
> > 1.8.3.2
> 

> > _______________________________________________
> 
> > lttng-dev mailing list
> 
> > lttng-dev@lists.lttng.org
> 
> > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 

[-- Attachment #1.2: Type: text/html, Size: 4278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag
       [not found] <1390002463-21184-1-git-send-email-marc-andre.laperle@ericsson.com>
  2014-01-18  2:31 ` [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag Simon Marchi
       [not found] ` <CAFXXi0nYX8xQAvDW+uox6bfx0ODa2Rdr4ex35pP8PmXotnMjyg@mail.gmail.com>
@ 2014-02-04 19:39 ` David Goulet
  2 siblings, 0 replies; 5+ messages in thread
From: David Goulet @ 2014-02-04 19:39 UTC (permalink / raw)
  To: Marc-Andre Laperle; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1296 bytes --]

FYI, there is a lot of development on the relayd right now so I'll be
merging this patch with everything else thus consider it merged but not
yet upstream.

Once upstream in the master branch, it will be ported to 2.4 stable.

Big thanks!
David

On 17 Jan (18:47:43), Marc-Andre Laperle wrote:
> This struct is meant to be sent over the network so members should be
> of exact-width.
> 
> Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
> ---
>  src/bin/lttng-relayd/lttng-viewer.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bin/lttng-relayd/lttng-viewer.h b/src/bin/lttng-relayd/lttng-viewer.h
> index 1977a43..6330270 100644
> --- a/src/bin/lttng-relayd/lttng-viewer.h
> +++ b/src/bin/lttng-relayd/lttng-viewer.h
> @@ -100,7 +100,7 @@ struct lttng_viewer_session {
>  struct lttng_viewer_stream {
>  	uint64_t id;
>  	uint64_t ctf_trace_id;
> -	int metadata_flag;
> +	uint32_t metadata_flag;
>  	char path_name[LTTNG_VIEWER_PATH_MAX];
>  	char channel_name[LTTNG_VIEWER_NAME_MAX];
>  } __attribute__((__packed__));
> -- 
> 1.8.3.2
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 603 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag
@ 2014-01-17 23:47 Marc-Andre Laperle
  0 siblings, 0 replies; 5+ messages in thread
From: Marc-Andre Laperle @ 2014-01-17 23:47 UTC (permalink / raw)
  To: lttng-dev

This struct is meant to be sent over the network so members should be
of exact-width.

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
---
 src/bin/lttng-relayd/lttng-viewer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/lttng-relayd/lttng-viewer.h b/src/bin/lttng-relayd/lttng-viewer.h
index 1977a43..6330270 100644
--- a/src/bin/lttng-relayd/lttng-viewer.h
+++ b/src/bin/lttng-relayd/lttng-viewer.h
@@ -100,7 +100,7 @@ struct lttng_viewer_session {
 struct lttng_viewer_stream {
 	uint64_t id;
 	uint64_t ctf_trace_id;
-	int metadata_flag;
+	uint32_t metadata_flag;
 	char path_name[LTTNG_VIEWER_PATH_MAX];
 	char channel_name[LTTNG_VIEWER_NAME_MAX];
 } __attribute__((__packed__));
-- 
1.8.3.2

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

end of thread, other threads:[~2014-02-04 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1390002463-21184-1-git-send-email-marc-andre.laperle@ericsson.com>
2014-01-18  2:31 ` [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag Simon Marchi
     [not found] ` <CAFXXi0nYX8xQAvDW+uox6bfx0ODa2Rdr4ex35pP8PmXotnMjyg@mail.gmail.com>
2014-01-20 20:25   ` Marc-André Laperle
     [not found]   ` <D381217948BF4C45AF756AFC995BEB9F1C1A2A4D@eusaamb103.ericsson.se>
2014-01-30 22:54     ` Mathieu Desnoyers
2014-02-04 19:39 ` David Goulet
2014-01-17 23:47 Marc-Andre Laperle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.