From edc3a0dedb72f5ff374c536a740af5e7ba45dbf6 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 17 Apr 2013 12:29:17 -0400 Subject: pfc: display syscall names instead of numbers in the comments Signed-off-by: Paul Moore --- src/gen_pfc.c | 5 +++-- 1 file 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) { -- cgit v1.2.1