All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Subject: [PATCH V4 02/14] env: Couple networking-related variable flags to CONFIG_NET
Date: Thu,  2 Feb 2023 09:07:47 +0100	[thread overview]
Message-ID: <421200a0f02ebc7d419ffb201cd3bc64b9ee3da1.1675325279.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1675325279.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

Boards may set networking variables programmatically, thus may have
CONFIG_NET on but CONFIG_CMD_NET off. The IOT2050 is an example.

CC: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 env/flags.c         | 10 +++++-----
 include/env_flags.h |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/env/flags.c b/env/flags.c
index e3e833c4333..e2866361dfe 100644
--- a/env/flags.c
+++ b/env/flags.c
@@ -22,7 +22,7 @@
 #include <env_internal.h>
 #endif
 
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 #define ENV_FLAGS_NET_VARTYPE_REPS "im"
 #else
 #define ENV_FLAGS_NET_VARTYPE_REPS ""
@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {
 	"decimal",
 	"hexadecimal",
 	"boolean",
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 	"IP address",
 	"MAC address",
 #endif
@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end,
 		*end = value;
 }
 
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 int eth_validate_ethaddr_str(const char *addr)
 {
 	const char *end;
@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value,
 	enum env_flags_vartype type)
 {
 	const char *end;
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 	const char *cur;
 	int i;
 #endif
@@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,
 		if (value[1] != '\0')
 			return -1;
 		break;
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 	case env_flags_vartype_ipaddr:
 		cur = value;
 		for (i = 0; i < 4; i++) {
diff --git a/include/env_flags.h b/include/env_flags.h
index 6bd574c2bdb..7de58cc57c3 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -12,7 +12,7 @@ enum env_flags_vartype {
 	env_flags_vartype_decimal,
 	env_flags_vartype_hex,
 	env_flags_vartype_bool,
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 	env_flags_vartype_ipaddr,
 	env_flags_vartype_macaddr,
 #endif
@@ -121,7 +121,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags);
  */
 enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags);
 
-#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_NET
 /*
  * Check if a string has the format of an Ethernet MAC address
  */
-- 
2.35.3


  parent reply	other threads:[~2023-02-02  8:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02  8:07 [PATCH V4 00/14] IOT2050-related enhancements Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 01/14] env: Complete generic support for writable list Jan Kiszka
2023-02-02 12:48   ` Marek Vasut
2023-02-02 13:51     ` Jan Kiszka
2023-02-02 14:57       ` Marek Vasut
2023-02-02  8:07 ` Jan Kiszka [this message]
2023-02-02  8:07 ` [PATCH V4 03/14] tools: Add script for converting public key into device tree include Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 04/14] board: siemens: iot2050: Split the build for PG1 and PG2 Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 05/14] arm: dts: iot2050: Use the auto generator nodes for fdt Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 06/14] iot2050: Update firmware layout Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 07/14] iot2050: Add watchdog start to bootcmd Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 08/14] iot2050: Add CONFIG_ENV_FLAGS_LIST_STATIC Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 09/14] arm: dts: iot2050: Allow verifying U-Boot proper by SPL Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 10/14] iot2050: Add script for signing artifacts Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 11/14] arm: dts: iot2050: Optionally embed OTP programming data into image Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 12/14] doc: iot2050: Add a note about the watchdog firmware Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 13/14] board: siemens: iot2050: use the named gpio to control the user-button Jan Kiszka
2023-02-02  8:07 ` [PATCH V4 14/14] iot2050: Refresh defconfigs and activate CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN Jan Kiszka

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=421200a0f02ebc7d419ffb201cd3bc64b9ee3da1.1675325279.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=joe.hershberger@ni.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.