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. Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260611-fix-ufetch-compile-v1-1-43f2e3239265@baylibre.com Signed-off-by: David Lechner <dlechner@baylibre.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user