/* * running the graphic mode */ void run_graphic_mode(void) { do { xboot_set_mode(MODE_SHELL); } while(xboot_get_mode() == MODE_GRAPHIC); }
/* * default application for this mode */ static void default_application(void) { do { /* * enter to shell mode */ xboot_set_mode(MODE_SHELL); } while(xboot_get_mode() == MODE_APPLICATION); }
static int exit_to_mode(int argc, char ** argv) { if(argc == 1) { xboot_set_mode(MODE_MENU); } else if(argc == 2) { if( (strcmp((const char *)argv[1], "-n") == 0) || (strcmp((const char *)argv[1], "--normal") == 0) ) { xboot_set_mode(MODE_NORMAL); } else if( (strcmp((const char *)argv[1], "-s") == 0) || (strcmp((const char *)argv[1], "--shell") == 0) ) { xboot_set_mode(MODE_SHELL); } else if( (strcmp((const char *)argv[1], "-m") == 0) || (strcmp((const char *)argv[1], "--menu") == 0) ) { xboot_set_mode(MODE_MENU); } else if( (strcmp((const char *)argv[1], "-g") == 0) || (strcmp((const char *)argv[1], "--graphic") == 0) ) { xboot_set_mode(MODE_GRAPHIC); } else if( (strcmp((const char *)argv[1], "-a") == 0) || (strcmp((const char *)argv[1], "--application") == 0) ) { xboot_set_mode(MODE_APPLICATION); } else { usage(); return -1; } } else { usage(); return -1; } return 0; }