summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-10-25 16:05:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-30 15:50:06 +0100
commitea334dc328c9bbba68098d2f779293528a123c23 (patch)
tree53e7dcdc85f33a575030ce89dc00b6a7f02530cd /src
parent9e486265716963439fb0fd7f2a97abf109f24f75 (diff)
downloadsystemd-ea334dc328c9bbba68098d2f779293528a123c23.tar.gz
systemd-ea334dc328c9bbba68098d2f779293528a123c23.tar.bz2
systemd-ea334dc328c9bbba68098d2f779293528a123c23.zip
analyze: sort list of unknown syscalls kernel implements
Diffstat (limited to 'src')
-rw-r--r--src/analyze/analyze.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 4d81026084..1871a4363e 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -1757,15 +1757,21 @@ static int dump_syscall_filters(int argc, char *argv[], void *userdata) {
fflush(stdout);
log_notice_errno(k, "# Not showing unlisted system calls, couldn't retrieve kernel system call list: %m");
} else if (!set_isempty(kernel)) {
- const char *syscall;
- Iterator j;
+ _cleanup_free_ char **l = NULL;
+ char **syscall;
printf("\n"
"# %sUnlisted System Calls%s (supported by the local kernel, but not included in any of the groups listed above):\n",
ansi_highlight(), ansi_normal());
- SET_FOREACH(syscall, kernel, j)
- printf("# %s\n", syscall);
+ l = set_get_strv(kernel);
+ if (!l)
+ return log_oom();
+
+ strv_sort(l);
+
+ STRV_FOREACH(syscall, l)
+ printf("# %s\n", *syscall);
}
} else {
char **name;