Use uint32_t for lttng_viewer_stream.metadata_flag
A message that is not in the archive (sent off-list or not yet received): 1390002463-21184-1-git-send-email-marc-andre.laperle@ericsson.com
While you are at it, you could change the char fields as well, since char is not exact-width either.
Quoted 26 lines · Marc-Andre Laperle
This struct is meant to be sent over the network so members should be of exact-width.
Signed-off-by Marc-Andre Laperle <[email protected]>--- src/bin/lttng-relayd/lttng-viewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/bin/lttng-relayd/lttng-viewer.h +1
-2@@ -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
Quoted 5 lines
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): CAFXXi0nYX8xQAvDW+uox6bfx0ODa2Rdr4ex35pP8PmXotnMjyg@mail.gmail.com
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: [email protected] [[email protected]] on behalf of Simon Marchi [[email protected]]
Sent: Friday, 17 January 2014 9:31 PM
To: Marc-André Laperle
Cc: [email protected]
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 <[email protected]<mailto:[email protected]>> wrote:
This struct is meant to be sent over the network so members should be
of exact-width.
--- src/bin/lttng-relayd/lttng-viewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/bin/lttng-relayd/lttng-viewer.h +1 -1
@@ -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 [email protected]<mailto:[email protected]>
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
Using a char should be OK here.
----- Original Message -----
Quoted 86 lines
From: "Marc-André Laperle" <[email protected]>
To: "Simon Marchi" <[email protected]>
Cc: [email protected]
Sent: Monday, January 20, 2014 3:25:07 PM
Subject: Re: [lttng-dev] [PATCH] Useuint32_tfor lttng_viewer_stream.metadata_flagI'm not sure that's possible. Whether I change them to
uint8_torint8_t, I get warnings because they get used with strncpy which wants char. Any idea how to solve this?Marc-André
From: [email protected] [[email protected]] on behalf of Simon Marchi [[email protected]]
Sent: Friday, 17 January 2014 9:31 PM
To: Marc-André Laperle
Cc: [email protected]
Subject: Re: [lttng-dev] [PATCH] Useuint32_tfor lttng_viewer_stream.metadata_flagWhile you are at it, you could change the char fields as well, since char is not exact-width either.
Quoted 46 lines · Marc-Andre Laperle
This struct is meant to be sent over the network so members should be
of exact-width.
Signed-off-by Marc-Andre Laperle < [email protected] >---
src/bin/lttng-relayd/lttng-viewer.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)src/bin/lttng-relayd/lttng-viewer.h +0
-0index 1977a43..6330270 100644
---
a/src/bin/lttng-relayd/lttng-viewer.h+++
b/src/bin/lttng-relayd/lttng-viewer.hsrc/bin/lttng-relayd/lttng-viewer.h +1
-1@@ -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
Quoted 7 lines
_______________________________________________
lttng-dev mailing list
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
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
Quoted 29 lines · Marc-Andre Laperle
This struct is meant to be sent over the network so members should be of exact-width.
Signed-off-by Marc-Andre Laperle <[email protected]>--- src/bin/lttng-relayd/lttng-viewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/bin/lttng-relayd/lttng-viewer.h +1
-1@@ -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__ ));Signature · 7 lines
1.8.3.2 _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev