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