]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
8bb3626d | 2 | /*** |
96b2fb93 | 3 | Copyright © 2015 Zbigniew Jędrzejewski-Szmek |
8bb3626d ZJS |
4 | ***/ |
5 | ||
6 | #include <stdio.h> | |
7 | #include <linux/audit.h> | |
8 | ||
9 | #include "audit-type.h" | |
10 | ||
11 | static void print_audit_label(int i) { | |
12 | const char *name; | |
13 | ||
14 | name = audit_type_name_alloca(i); | |
15 | /* This is a separate function only because of alloca */ | |
16 | printf("%i → %s → %s\n", i, audit_type_to_string(i), name); | |
17 | } | |
18 | ||
19 | static void test_audit_type(void) { | |
20 | int i; | |
21 | ||
22 | for (i = 0; i <= AUDIT_KERNEL; i++) | |
23 | print_audit_label(i); | |
24 | } | |
25 | ||
26 | int main(int argc, char **argv) { | |
27 | test_audit_type(); | |
28 | } |