]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
cli: add quit command
authorEric Leblond <eric@regit.org>
Sun, 2 Jun 2013 10:03:13 +0000 (12:03 +0200)
committerEric Leblond <eric@regit.org>
Sat, 8 Jun 2013 10:06:22 +0000 (12:06 +0200)
src/cli.c

index a5a891e25a579b69921653163c73e2af1b71c647..541c26cafa8d0add362296f68b76f9bd23a8ff27 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -99,6 +99,11 @@ static void cli_complete(char *line)
        if (*c == '\0')
                return;
 
+       if (!strcmp(line, "quit")) {
+               cli_exit();
+               exit(0);
+       }
+
        /* avoid duplicate history entries */
        hist = history_get(history_length);
        if (hist == NULL || strcmp(hist->line, line))