netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Leblond <eric@regit.org>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@regit.org>
Subject: [nftables PATCH 4/5] cli: add quit command
Date: Sun,  2 Jun 2013 12:38:31 +0200	[thread overview]
Message-ID: <1370169512-23500-5-git-send-email-eric@regit.org> (raw)
In-Reply-To: <1370169512-23500-1-git-send-email-eric@regit.org>


Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/cli.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/cli.c b/src/cli.c
index a5a891e..541c26c 100644
--- 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))
-- 
1.7.10.4


  parent reply	other threads:[~2013-06-02 10:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 10:38 [nftables PATCH 0/5] misc fixes Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 1/5] doc: fix inversion of operator and object Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 2/5] expression: don't free TYPE_INVALID datatype Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 3/5] rule: list elements in set in any case Eric Leblond
2013-06-02 10:38 ` Eric Leblond [this message]
2013-06-02 10:38 ` [nftables PATCH 5/5] cli: reset terminal when CTRL+d is pressed Eric Leblond
2013-06-06 11:43 ` [nftables PATCH 0/5] misc fixes Pablo Neira Ayuso
2013-06-06 12:02   ` Pablo Neira Ayuso
2013-06-08 10:12     ` Eric Leblond

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370169512-23500-5-git-send-email-eric@regit.org \
    --to=eric@regit.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).