]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/journal/test-audit-type.c
license: LGPL-2.1+ -> LGPL-2.1-or-later
[thirdparty/systemd.git] / src / journal / test-audit-type.c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include <stdio.h>
4 #include <linux/audit.h>
5
6 #include "audit-type.h"
7
8 static void print_audit_label(int i) {
9 const char *name;
10
11 name = audit_type_name_alloca(i);
12 /* This is a separate function only because of alloca */
13 printf("%i → %s → %s\n", i, audit_type_to_string(i), name);
14 }
15
16 static void test_audit_type(void) {
17 int i;
18
19 for (i = 0; i <= AUDIT_KERNEL; i++)
20 print_audit_label(i);
21 }
22
23 int main(int argc, char **argv) {
24 test_audit_type();
25 return 0;
26 }