From a32ba9323999073cd4fa804b8238197233739f16 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 20 Jan 2013 13:21:01 +0100 Subject: startup: use IS_ENABLED instead of ifdef Signed-off-by: Sascha Hauer --- common/startup.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'common/startup.c') diff --git a/common/startup.c b/common/startup.c index c36bf7c763..6513ba536a 100644 --- a/common/startup.c +++ b/common/startup.c @@ -94,9 +94,7 @@ void start_barebox (void) { initcall_t *initcall; int result; -#ifdef CONFIG_COMMAND_SUPPORT struct stat s; -#endif if (!IS_ENABLED(CONFIG_SHELL_NONE)) barebox_main = run_shell; @@ -122,15 +120,16 @@ void start_barebox (void) #endif } #endif -#ifdef CONFIG_COMMAND_SUPPORT - printf("running /env/bin/init...\n"); - if (!stat("/env/bin/init", &s)) { - run_command("source /env/bin/init", 0); - } else { - printf("not found\n"); + if (IS_ENABLED(CONFIG_COMMAND_SUPPORT)) { + printf("running /env/bin/init...\n"); + + if (!stat("/env/bin/init", &s)) { + run_command("source /env/bin/init", 0); + } else { + printf("not found\n"); + } } -#endif if (!barebox_main) { printf("No main function! aborting.\n"); -- cgit v1.2.3