From c5104e73cbd638b00e1c5c9e5ede915fa5be3f4f Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Sun, 16 Jan 2011 12:49:05 +0000 Subject: [PATCH] suppress 'Unable to initialize the eLua shell' message when BUILD_SHELL is not defined --- src/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index 00d4b9ad..cc72966c 100644 --- a/src/main.c +++ b/src/main.c @@ -29,12 +29,12 @@ // in the order you want eLua to search for them char *boot_order[] = { #if defined(BUILD_MMCFS) - "/mmc/autorun.lua", - "/mmc/autorun.lc", + "/mmc/autorun.lua", + "/mmc/autorun.lc", #endif #if defined(BUILD_ROMFS) - "/rom/autorun.lua", - "/rom/autorun.lc", + "/rom/autorun.lua", + "/rom/autorun.lc", #endif }; @@ -103,14 +103,15 @@ int main( void ) dm_register( remotefs_init() ); // Search for autorun files in the defined order and execute the 1st if found - for( i = 0; i < sizeof( boot_order )/sizeof( *boot_order ); i++ ){ - if( ( fp = fopen( boot_order[i], "r" ) ) != NULL ) - { - fclose( fp ); - char* lua_argv[] = { "lua", boot_order[i], NULL }; - lua_main( 2, lua_argv ); - break; // autoruns only the first found - } + for( i = 0; i < sizeof( boot_order ) / sizeof( *boot_order ); i++ ) + { + if( ( fp = fopen( boot_order[ i ], "r" ) ) != NULL ) + { + fclose( fp ); + char* lua_argv[] = { "lua", boot_order[i], NULL }; + lua_main( 2, lua_argv ); + break; // autoruns only the first found + } } #ifdef ELUA_BOOT_RPC @@ -120,7 +121,6 @@ int main( void ) // Run the shell if( shell_init() == 0 ) { - printf( "Unable to initialize the eLua shell!\n" ); // Start Lua directly char* lua_argv[] = { "lua", NULL }; lua_main( 1, lua_argv );