X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Factions%2Fnotify.c;fp=src%2Fcommon%2Factions%2Fnotify.c;h=00d1a0ef4e0e9828f0a55d150fb408e55b843a57;hp=0000000000000000000000000000000000000000;hb=03bb2358875cfca96394e78357c96baaa1e91efa;hpb=0d32d1a95331da3baf00ad1eb7be907129c6a9db diff --git a/src/common/actions/notify.c b/src/common/actions/notify.c new file mode 100644 index 000000000..00d1a0ef4 --- /dev/null +++ b/src/common/actions/notify.c @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2017 Jérémie Galarneau + * + * SPDX-License-Identifier: LGPL-2.1-only + * + */ + +#include +#include +#include +#include + +static +void lttng_action_notify_destroy(struct lttng_action *action) +{ + free(action); +} + +static +int lttng_action_notify_serialize(struct lttng_action *action, + struct lttng_dynamic_buffer *buf) +{ + return 0; +} + +struct lttng_action *lttng_action_notify_create(void) +{ + struct lttng_action_notify *notify; + + notify = zmalloc(sizeof(struct lttng_action_notify)); + if (!notify) { + goto end; + } + + notify->parent.type = LTTNG_ACTION_TYPE_NOTIFY; + notify->parent.serialize = lttng_action_notify_serialize; + notify->parent.destroy = lttng_action_notify_destroy; +end: + return ¬ify->parent; +}