projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port: FreeBSD has no ENODATA, alias it to ENOATTR
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index 4eb36a2612d952bb71d38e9cedcc4d70a47d6148..60e820bd25e4a1089a0854b3bd771ce4f9a85bf6 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-13,13
+13,13
@@
#define _LGPL_SOURCE
#include <assert.h>
#include <grp.h>
#define _LGPL_SOURCE
#include <assert.h>
#include <grp.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <common/common.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <common/common.h>
+#include <common/compat/errno.h>
#include <common/compat/string.h>
#include <common/defaults.h>
#include <common/dynamic-buffer.h>
#include <common/compat/string.h>
#include <common/defaults.h>
#include <common/dynamic-buffer.h>
@@
-2970,7
+2970,11
@@
int lttng_register_trigger(struct lttng_trigger *trigger)
goto end;
}
goto end;
}
- lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ if (ret) {
+ ret = -LTTNG_ERR_NOMEM;
+ goto end;
+ }
/*
* This is needed to populate the trigger object size for the command
/*
* This is needed to populate the trigger object size for the command
@@
-3030,7
+3034,11
@@
int lttng_unregister_trigger(struct lttng_trigger *trigger)
memset(&lsm, 0, sizeof(lsm));
lsm.cmd_type = LTTNG_UNREGISTER_TRIGGER;
memset(&lsm, 0, sizeof(lsm));
lsm.cmd_type = LTTNG_UNREGISTER_TRIGGER;
- lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ if (ret) {
+ ret = -LTTNG_ERR_NOMEM;
+ goto end;
+ }
/*
* This is needed to populate the trigger object size for the command
/*
* This is needed to populate the trigger object size for the command
This page took
0.023468 seconds
and
4
git commands to generate.