#include <stddef.h>
#include <stdint.h>
#include <urcu-pointer.h>
-#include <byteswap.h>
+#include <lttng/ust-endian.h>
#include "lttng-filter.h"
#include "string-utils.h"
uint64_t lttng_filter_false(void *filter_data,
const char *filter_stack_data)
{
- return 0;
+ return LTTNG_FILTER_DISCARD;
}
#ifdef INTERPRETER_USE_SWITCH
{
uint16_t tmp;
- dbg_printf("op load field s16\n");
+ dbg_printf("op load field u16\n");
tmp = *(uint16_t *) stack_top->u.ptr.ptr;
if (stack_top->u.ptr.rev_bo)
tmp = bswap_16(tmp);
goto end;
OP(FILTER_OP_RETURN):
- /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
+ /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
/* Handle dynamic typing. */
switch (estack_ax_t) {
case REG_S64:
goto end;
OP(FILTER_OP_RETURN_S64):
- /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
+ /* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
retval = !!estack_ax_v;
ret = 0;
goto end;
END_OP
end:
- /* return 0 (discard) on error */
+ /* Return _DISCARD on error. */
if (ret)
- return 0;
+ return LTTNG_FILTER_DISCARD;
return retval;
}