aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/ldlinux.c
blob: 967eebb95c460d418a5b5767803895b238cfccb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <linux/list.h>
#include <sys/times.h>
#include <stdbool.h>
#include "cli.h"
#include "console.h"

#include <sys/module.h>

static void enter_cmdline(void)
{
	struct cli_command  *aux;
	char *cmdline;

	/* Enter endless command line prompt, should support "exit" */
	while (1) {
		cmdline = edit_cmdline("", 1, NULL, NULL);
		/* feng: give up the aux check here */
		//aux = list_entry(cli_history_head.next, typeof(*aux), list);
		//if (strcmp(aux->command, cmdline)) {
			process_command(cmdline, true);
		//}
	}
}

static int ldlinux_main(int argc, char **argv)
{
	openconsole(&dev_rawcon_r, &dev_ansiserial_w);

	/* Should never return */
	enter_cmdline();

	return 0;
}
MODULE_MAIN(ldlinux_main);