summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-01-20 13:21:01 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-20 16:33:02 +0100
commita32ba9323999073cd4fa804b8238197233739f16 (patch)
treec51c63835e3114651f40309889edf8c06265ccc9 /common
parent4e6c5d5ff0c23bfbdcfb06b1398310411678f8ce (diff)
downloadbarebox-a32ba9323999073cd4fa804b8238197233739f16.tar.gz
barebox-a32ba9323999073cd4fa804b8238197233739f16.tar.xz
startup: use IS_ENABLED instead of ifdef
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/startup.c17
1 files changed, 8 insertions, 9 deletions
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");