diff options
author | Paul Moore <pmoore@redhat.com> | 2013-04-17 12:29:17 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2013-04-17 12:29:17 -0400 |
commit | edc3a0dedb72f5ff374c536a740af5e7ba45dbf6 (patch) | |
tree | 081bed9f6ad8871b491a4e353ff44e428cde6184 /src/gen_pfc.c | |
parent | 17ee994f5f1099c1e81c76feba8fb503deb1f6cb (diff) | |
download | libseccomp-edc3a0dedb72f5ff374c536a740af5e7ba45dbf6.tar.gz |
pfc: display syscall names instead of numbers in the comments
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/gen_pfc.c')
-rw-r--r-- | src/gen_pfc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gen_pfc.c b/src/gen_pfc.c index 4f962e4..9da9a0c 100644 --- a/src/gen_pfc.c +++ b/src/gen_pfc.c @@ -205,10 +205,11 @@ static void _gen_pfc_syscall(const struct arch_def *arch, const struct db_sys_list *sys, FILE *fds) { unsigned int sys_num = sys->num; + const char *sys_name = arch_syscall_resolve_num(arch, sys_num); _indent(fds, 1); - fprintf(fds, "# filter for syscall #%d (priority: %d)\n", - sys_num, sys->priority); + fprintf(fds, "# filter for syscall \"%s\" (%d) [priority: %d]\n", + (sys_name ? sys_name : "UNKNOWN"), sys_num, sys->priority); _indent(fds, 1); fprintf(fds, "if ($syscall == %d)\n", sys_num); if (sys->chains == NULL) { |