From 069009f8e39238ec1a67fba6cfb287b9a0cac83e Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 24 Mar 2023 10:07:48 +0100 Subject: Re-organize project and add license header --- src/cooker/util.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/cooker/util.c (limited to 'src/cooker/util.c') diff --git a/src/cooker/util.c b/src/cooker/util.c new file mode 100644 index 0000000..a2ecce0 --- /dev/null +++ b/src/cooker/util.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +/* seitan - Syscall Expressive Interpreter, Transformer and Notifier + * + * cooker/util.c - Convenience routines + * + * Copyright 2023 Red Hat GmbH + * Author: Stefano Brivio + */ + +#include +#include +#include + +#define logfn(name) \ +void name(const char *format, ...) { \ + va_list args; \ + \ + va_start(args, format); \ + (void)vfprintf(stderr, format, args); \ + va_end(args); \ + if (format[strlen(format)] != '\n') \ + fprintf(stderr, "\n"); \ +} + +logfn(err) +logfn(info) +logfn(debug) + -- cgit v1.2.3