Skip to contentSkip to conversation

cmd: ufetch: fix compiling with no CONFIG_SYS_CONFIG_NAME

PATCH Applied David Lechner 2 participants 4 messages Jun 11 – Aug 5

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: ufetch: fix compiling with no CONFIG_SYS_CONFIG_NAME

Add some preprocessor guards to avoid a compile error when CONFIG_SYS_CONFIG_NAME is not defined.

---
 cmd/ufetch.c | 4 ++++
 1 file changed, 4 insertions(+)
cmd/ufetch.c +4 -0
index e7b5d773f5e..ff2d1deb24c 100644
@@ -60,7 +60,9 @@ enum output_lines {
 	FIRST,
 	SECOND,
 	KERNEL,
+#ifdef CONFIG_SYS_CONFIG_NAME
 	SYSINFO,
+#endif
 	HOST,
 	UPTIME,
 	IP,
@@ -125,9 +127,11 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
 		case KERNEL:
 			printf("Kernel:" RESET " %s\n", U_BOOT_VERSION);
 			break;
+#ifdef CONFIG_SYS_CONFIG_NAME
 		case SYSINFO:
 			printf("Config:" RESET " %s_defconfig\n", CONFIG_SYS_CONFIG_NAME);
 			break;
+#endif
 		case HOST:
 			model = ofnode_read_string(ofnode_root(), "model");
 			if (model)

---
base-commit: 53e9c41847c24b422ecd21421204d4e6a0c07d76
change-id: 20260611-fix-ufetch-compile-ce0e6e86e3e6

Best regards,

Signature · 1 line
David Lechner <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw

Hi David,

Quoted 4 lines · David Lechner

Add some preprocessor guards to avoid a compile error when CONFIG_SYS_CONFIG_NAME is not defined.

Thanks for the patch!

Quoted 39 lines
---
 cmd/ufetch.c | 4 ++++
 1 file changed, 4 insertions(+)
cmd/ufetch.c +4 -1
index e7b5d773f5e..ff2d1deb24c 100644
@@ -60,7 +60,9 @@ enum output_lines {
 	FIRST,
 	SECOND,
 	KERNEL,
+#ifdef CONFIG_SYS_CONFIG_NAME
 	SYSINFO,
+#endif
 	HOST,
 	UPTIME,
 	IP,
@@ -125,9 +127,11 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
 		case KERNEL:
 			printf("Kernel:" RESET " %s\n", U_BOOT_VERSION);
 			break;
+#ifdef CONFIG_SYS_CONFIG_NAME
 		case SYSINFO:
 			printf("Config:" RESET " %s_defconfig\n", CONFIG_SYS_CONFIG_NAME);
 			break;
+#endif
 		case HOST:
 			model = ofnode_read_string(ofnode_root(), "model");
 			if (model)
 
---

base-commit: 53e9c41847c24b422ecd21421204d4e6a0c07d76
change-id: 20260611-fix-ufetch-compile-ce0e6e86e3e6

Best regards,

Signature · 1 line
David Lechner <[email protected]>
Signature · 1 line
// Casey (she/her)
#2 lore raw
Quoted 12 lines · Casey Connolly

Hi David,

Quoted 4 lines · David Lechner

Add some preprocessor guards to avoid a compile error when CONFIG_SYS_CONFIG_NAME is not defined.

Thanks for the patch!

Hi, it looks like this patch still hasn't been picked up. It is blocking us from moving some boards to lwip network stack.

I can take it through the MediaTek tree if no one else want to claim responsibility.

author Applied
#3 lore raw
In reply to David Lechner
Quoted 1 line · David Lechner

cmd: ufetch: fix compiling with no CONFIG_SYS_CONFIG_NAME

Applied to mediatek-for-main, thanks!

[1/1] cmd: ufetch: fix compiling with no CONFIG_SYS_CONFIG_NAME

      commit: 478103c24626d4f98e15c374d171de522f903055

Best regards,

Signature · 1 line
David Lechner <[email protected]>