patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Kevin Traynor <ktraynor@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org, Chengwen Feng <fengchengwen@huawei.com>
Subject: [PATCH 1/5] cmdline: make rdline status not private
Date: Sat, 31 Aug 2024 10:09:25 -0700	[thread overview]
Message-ID: <20240831171035.27505-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20240831171035.27505-1-stephen@networkplumber.org>

The function cmdline_poll() returns values from rdline_status enum
but that was moved to being defined only in cmdline_private.h.

For proper use of the API the return value needs to be visible
to callers. This was not a problem before because cmdline_poll()
was not used anywhere.

Fixes: f8f8dc289095 ("cmdline: make struct rdline opaque")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
(cherry picked from commit 1ac8dd1d1b62c59cd440e5529e3bd5a500e72f76)
---
 lib/cmdline/cmdline.h         | 6 ++++++
 lib/cmdline/cmdline_private.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h
index 96674dfda2..b14355ef51 100644
--- a/lib/cmdline/cmdline.h
+++ b/lib/cmdline/cmdline.h
@@ -23,6 +23,12 @@
 extern "C" {
 #endif
 
+enum rdline_status {
+	RDLINE_INIT,
+	RDLINE_RUNNING,
+	RDLINE_EXITED
+};
+
 struct cmdline;
 
 struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h
index c2e906d8de..a3271c7693 100644
--- a/lib/cmdline/cmdline_private.h
+++ b/lib/cmdline/cmdline_private.h
@@ -23,12 +23,6 @@
 #define RDLINE_HISTORY_BUF_SIZE BUFSIZ
 #define RDLINE_HISTORY_MAX_LINE 64
 
-enum rdline_status {
-	RDLINE_INIT,
-	RDLINE_RUNNING,
-	RDLINE_EXITED
-};
-
 struct rdline {
 	enum rdline_status status;
 	/* rdline bufs */
-- 
2.45.2


       reply	other threads:[~2024-08-31 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240831171035.27505-1-stephen@networkplumber.org>
2024-08-31 17:09 ` Stephen Hemminger [this message]
2024-08-31 17:09 ` [PATCH 2/5] cmdline: handle EOF as quit Stephen Hemminger
2024-08-31 17:09 ` [PATCH 3/5] app/testpmd: cleanup cleanly from signal Stephen Hemminger
2024-08-31 17:09 ` [PATCH 4/5] app/testpmd: fix early exit " Stephen Hemminger
2024-08-31 17:09 ` [PATCH 5/5] app/testpmd: fix interactive mode on Windows Stephen Hemminger

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=20240831171035.27505-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=fengchengwen@huawei.com \
    --cc=ktraynor@redhat.com \
    --cc=stable@dpdk.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).