From 992b3001a225605640debab1be6feab6e367bb5e Mon Sep 17 00:00:00 2001 From: Bill Yuan Date: Fri, 13 Apr 2018 15:15:38 +0000 Subject: [PATCH] ipfw3: list loaded modules --- sbin/ipfw3/ipfw3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/ipfw3/ipfw3.c b/sbin/ipfw3/ipfw3.c index f15d9a67a8..f23ca9d96c 100644 --- a/sbin/ipfw3/ipfw3.c +++ b/sbin/ipfw3/ipfw3.c @@ -193,7 +193,7 @@ list_modules(int ac, char *av[]) err(EX_OSERR, "realloc"); get_modules(module_str, len); - printf("%s", (char *)module_str); + printf("%s\n", (char *)module_str); } void parse_accept(ipfw_insn **cmd, int *ac, char **av[]) @@ -2515,8 +2515,7 @@ ipfw_main(int ac, char **av) sets_handler(ac, av); } else if (!strncmp(*av, "module", strlen(*av))) { NEXT_ARG; - if (!strncmp(*av, "show", strlen(*av)) || - !strncmp(*av, "show", strlen(*av))) { + if (!strncmp(*av, "list", strlen(*av))) { list_modules(ac, av); } else { errx(EX_USAGE, "bad ipfw module command `%s'", *av); -- 2.41.0