Commit 69a5d57a authored by Alessandro Rubini's avatar Alessandro Rubini

arch-bare-*: support commandline parsing

This allows to pass "-V -V" or "-g" (slave only) and so on.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 8f8cda9d
......@@ -16,6 +16,7 @@ OBJ-libarch := $A/bare-startup.o \
$A/bare-time.o \
$A/syscalls.o \
lib/libc-functions.o \
lib/cmdline.o \
lib/div64.o
$(LIBARCH): $(OBJ-libarch)
......
......@@ -34,7 +34,7 @@ static DSTimeProperties timePropertiesDS;
static struct pp_servo servo;
static struct pp_frgn_master frgn_master;
void ppsi_main(void)
int ppsi_main(int argc, char **argv)
{
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
......@@ -56,6 +56,10 @@ void ppsi_main(void)
OPTS(ppi)->iface_name = "eth0";
if (pp_parse_cmdline(ppi, argc, argv) != 0)
return -1;
/* The actual sockets are opened in state-initializing */
bare_main_loop(ppi);
return 0;
}
......@@ -17,6 +17,7 @@ OBJ-libarch := $A/bare-startup.o \
$A/syscall.o \
$A/syscalls.o \
lib/libc-functions.o \
lib/cmdline.o \
lib/div64.o
$(LIBARCH): $(OBJ-libarch)
......
......@@ -34,7 +34,7 @@ static DSTimeProperties timePropertiesDS;
static struct pp_servo servo;
static struct pp_frgn_master frgn_master;
void ppsi_main(void)
int ppsi_main(int argc, char **argv)
{
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
......@@ -56,6 +56,10 @@ void ppsi_main(void)
OPTS(ppi)->iface_name = "eth0";
if (pp_parse_cmdline(ppi, argc, argv) != 0)
return -1;
/* The actual sockets are opened in state-initializing */
bare_main_loop(ppi);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment