projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-ctl: erroneous uses of LTTNG_PACKED
[lttng-tools.git]
/
src
/
common
/
sessiond-comm
/
sessiond-comm.h
diff --git
a/src/common/sessiond-comm/sessiond-comm.h
b/src/common/sessiond-comm/sessiond-comm.h
index fff9a5aaab7efc6de3016390f31ea24c19db0b06..fca331fe7511efdf84f384f90749cf3abfc4014f 100644
(file)
--- a/
src/common/sessiond-comm/sessiond-comm.h
+++ b/
src/common/sessiond-comm/sessiond-comm.h
@@
-41,7
+41,12
@@
#define LTTNG_SESSIOND_COMM_MAX_LISTEN 64
/* Maximum number of FDs that can be sent over a Unix socket */
#define LTTNG_SESSIOND_COMM_MAX_LISTEN 64
/* Maximum number of FDs that can be sent over a Unix socket */
-#define LTTCOMM_MAX_SEND_FDS 4
+#if defined(__linux__)
+/* Based on the kernel's SCM_MAX_FD which is 253 since 2.6.38 (255 before) */
+#define LTTCOMM_MAX_SEND_FDS 253
+#else
+#define LTTCOMM_MAX_SEND_FDS 16
+#endif
/*
* Get the error code index from 0 since LTTCOMM_OK start at 1000
/*
* Get the error code index from 0 since LTTCOMM_OK start at 1000
@@
-278,7
+283,7
@@
struct lttcomm_session_msg {
/* Event data */
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
/* Event data */
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
- struct lttng_event event
LTTNG_PACKED
;
+ struct lttng_event event;
/* Length of following filter expression. */
uint32_t expression_len;
/* Length of following bytecode for filter. */
/* Length of following filter expression. */
uint32_t expression_len;
/* Length of following bytecode for filter. */
@@
-297,7
+302,7
@@
struct lttcomm_session_msg {
} LTTNG_PACKED enable;
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
} LTTNG_PACKED enable;
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
- struct lttng_event event
LTTNG_PACKED
;
+ struct lttng_event event;
/* Length of following filter expression. */
uint32_t expression_len;
/* Length of following bytecode for filter. */
/* Length of following filter expression. */
uint32_t expression_len;
/* Length of following bytecode for filter. */
@@
-311,14
+316,13
@@
struct lttcomm_session_msg {
} LTTNG_PACKED disable;
/* Create channel */
struct {
} LTTNG_PACKED disable;
/* Create channel */
struct {
- struct lttng_channel chan LTTNG_PACKED;
- /* struct lttng_channel_extended is already packed. */
+ struct lttng_channel chan;
struct lttng_channel_extended extended;
} LTTNG_PACKED channel;
/* Context */
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
struct lttng_channel_extended extended;
} LTTNG_PACKED channel;
/* Context */
struct {
char channel_name[LTTNG_SYMBOL_NAME_LEN];
- struct lttng_event_context ctx
LTTNG_PACKED
;
+ struct lttng_event_context ctx;
uint32_t provider_name_len;
uint32_t context_name_len;
} LTTNG_PACKED context;
uint32_t provider_name_len;
uint32_t context_name_len;
} LTTNG_PACKED context;
@@
-337,18
+341,18
@@
struct lttcomm_session_msg {
uint32_t size;
} LTTNG_PACKED uri;
struct {
uint32_t size;
} LTTNG_PACKED uri;
struct {
- struct lttng_snapshot_output output
LTTNG_PACKED
;
+ struct lttng_snapshot_output output;
} LTTNG_PACKED snapshot_output;
struct {
uint32_t wait;
} LTTNG_PACKED snapshot_output;
struct {
uint32_t wait;
- struct lttng_snapshot_output output
LTTNG_PACKED
;
+ struct lttng_snapshot_output output;
} LTTNG_PACKED snapshot_record;
struct {
uint32_t nb_uri;
unsigned int timer_interval; /* usec */
} LTTNG_PACKED session_live;
struct {
} LTTNG_PACKED snapshot_record;
struct {
uint32_t nb_uri;
unsigned int timer_interval; /* usec */
} LTTNG_PACKED session_live;
struct {
- struct lttng_save_session_attr attr;
/* struct already packed */
+ struct lttng_save_session_attr attr;
} LTTNG_PACKED save_session;
struct {
char shm_path[PATH_MAX];
} LTTNG_PACKED save_session;
struct {
char shm_path[PATH_MAX];
@@
-411,6
+415,8
@@
struct lttcomm_session_msg {
/* An lttng_session_descriptor follows. */
} LTTNG_PACKED create_session;
} u;
/* An lttng_session_descriptor follows. */
} LTTNG_PACKED create_session;
} u;
+ /* Count of fds sent. */
+ uint32_t fd_count;
} LTTNG_PACKED;
#define LTTNG_FILTER_MAX_LEN 65536
} LTTNG_PACKED;
#define LTTNG_FILTER_MAX_LEN 65536
This page took
0.025654 seconds
and
4
git commands to generate.