]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/journal/test-audit-type.c
Merge pull request #16059 from keszybz/resolve-single-label-names
[thirdparty/systemd.git] / src / journal / test-audit-type.c
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
8bb3626d
ZJS
2
3#include <stdio.h>
4#include <linux/audit.h>
5
6#include "audit-type.h"
7
8static 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
16static void test_audit_type(void) {
17 int i;
18
19 for (i = 0; i <= AUDIT_KERNEL; i++)
20 print_audit_label(i);
21}
22
23int main(int argc, char **argv) {
24 test_audit_type();
243945e9 25 return 0;
8bb3626d 26}