Ejemplo n.º 1
0
static void do_command(char *c)
{
	char *token;

	token = get_token(&c);

	if(strcmp(token, "flush") == 0) flush_bridge_cache();

	else if(strcmp(token, "mr") == 0) mr(get_token(&c), get_token(&c));
	else if(strcmp(token, "mw") == 0) mw(get_token(&c), get_token(&c), get_token(&c));
	else if(strcmp(token, "mc") == 0) mc(get_token(&c), get_token(&c), get_token(&c));
	else if(strcmp(token, "crc") == 0) crc(get_token(&c), get_token(&c));
	
	else if(strcmp(token, "ls") == 0) ls();
	else if(strcmp(token, "load") == 0) load(get_token(&c), get_token(&c));
	
	else if(strcmp(token, "serialboot") == 0) serialboot();
	else if(strcmp(token, "netboot") == 0) netboot();
	else if(strcmp(token, "cardboot") == 0) cardboot(0);

	else if(strcmp(token, "mdior") == 0) mdior(get_token(&c));
	else if(strcmp(token, "mdiow") == 0) mdiow(get_token(&c), get_token(&c));

	else if(strcmp(token, "reboot") == 0) reboot();
	
	else if(strcmp(token, "help") == 0) help();
	
	else if(strcmp(token, "") != 0)
		printf("Command not found\n");
}
Ejemplo n.º 2
0
static void do_command(char *c)
{
	char *token;

	token = get_token(&c);

	if(strcmp(token, "cons") == 0) vga_set_console(!vga_get_console());
	else if(strcmp(token, "flush") == 0) flush_bridge_cache();
	else if(strcmp(token, "mr") == 0) mr(get_token(&c), get_token(&c));
	else if(strcmp(token, "mw") == 0) mw(get_token(&c), get_token(&c), get_token(&c));
	else if(strcmp(token, "mc") == 0) mc(get_token(&c), get_token(&c), get_token(&c));
	else if(strcmp(token, "crc") == 0) crc(get_token(&c), get_token(&c));

	else if(strcmp(token, "ls") == 0) ls(get_token(&c));
	else if(strcmp(token, "load") == 0) load(get_token(&c), get_token(&c), get_token(&c));

	else if(strcmp(token, "netboot") == 0) netboot();
	else if(strcmp(token, "serialboot") == 0) serialboot();
	else if(strcmp(token, "fsboot") == 0) fsboot(BLOCKDEV_MEMORY_CARD);
	else if(strcmp(token, "flashboot") == 0) flashboot();

	else if(strcmp(token, "mdior") == 0) mdior(get_token(&c));
	else if(strcmp(token, "mdiow") == 0) mdiow(get_token(&c), get_token(&c));

	else if(strcmp(token, "version") == 0) puts(VERSION);
	else if(strcmp(token, "reboot") == 0) reboot();
	else if(strcmp(token, "reconf") == 0) reconf();

	else if(strcmp(token, "help") == 0) help();

	else if(strcmp(token, "rcsr") == 0) rcsr(get_token(&c));
	else if(strcmp(token, "wcsr") == 0) wcsr(get_token(&c), get_token(&c));

	else if(strcmp(token, "") != 0)
		printf("Command not found\n");
}