Commit c9e6a1ce authored by Aurelio Colosimo's avatar Aurelio Colosimo

trivial: rename pp_open_instance to pp_open_globals

pp_open_instance received a struct pp_globals, so rename it coherently.
We have no pp_open_instance alone because an instance can live only inside its
pp_globals struct.
Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 9f687759
......@@ -33,7 +33,7 @@ $(LIBARCH): $(OBJ-libarch)
all: $(TARGET)
# to build the target, we need -lstd again, in case we call functions that
# were not selected yet (e.g., pp_open_instance() ).
# were not selected yet (e.g., pp_open_globals() ).
$(TARGET): $(TARGET).o $A/crt0.o $(LIBARCH)
$(CC) -Wl,-Map,$(TARGET).map2 $(ARCH_LDFLAGS) -o $@ $A/crt0.o \
$(TARGET).o -L$A -larch -L$D -lstd
......
......@@ -34,7 +34,7 @@ $(LIBARCH): $(OBJ-libarch)
all: $(TARGET)
# to build the target, we need -lstd again, in case we call functions that
# were not selected yet (e.g., pp_open_instance() ).
# were not selected yet (e.g., pp_open_globals() ).
$(TARGET): $(TARGET).o $A/crt0.o $(LIBARCH)
$(CC) -Wl,-Map,$(TARGET).map2 $(ARCH_LDFLAGS) -o $@ $A/crt0.o \
$(TARGET).o -L$A -larch -L$D -lstd
......
......@@ -25,7 +25,7 @@ $(LIBARCH): $(OBJ-libarch)
all: $(TARGET)
# to build the target, we need -lstd again, in case we call functions that
# were not selected yet (e.g., pp_open_instance() ).
# were not selected yet (e.g., pp_open_globals() ).
$(TARGET): $(TARGET).o $(LIBARCH)
$(CC) -Wl,-Map,$(TARGET).map2 -o $@ $(TARGET).o \
-L$A -larch -L$D -lstd -lrt
......
......@@ -121,7 +121,7 @@ int main(int argc, char **argv)
/* FIXME temporary workaround to make the first interface work as in the past */
if (ppg->nlinks == 1) {
struct pp_instance *ppi = &ppg->pp_instances[0];
pp_open_instance(ppg, NULL);
pp_open_globals(ppg, NULL);
if (pp_parse_cmdline(ppi, argc, argv) != 0)
return -1;
}
......
......@@ -146,7 +146,7 @@ int wrc_ptp_start()
{
struct pp_instance *ppi = &ppi_static;
pp_open_instance(&ppg_static, 0 /* no opts */);
pp_open_globals(&ppg_static, 0 /* no opts */);
/* Call the state machine. Being it in "Initializing" state, make
* ppsi initialize what is necessary */
......
......@@ -218,7 +218,7 @@ static inline void pp_timeout_restart_annrec(struct pp_instance *ppi)
/* The channel for an instance must be created and possibly destroyed. */
extern int pp_open_instance(struct pp_globals *ppg,
extern int pp_open_globals(struct pp_globals *ppg,
struct pp_runtime_opts *rt_opts);
extern int pp_close_instance(struct pp_instance *ppi);
......
......@@ -53,7 +53,7 @@ int ppsi_main(int argc, char **argv)
ppi->iface_name = "eth0";
/* This just llocates the stuff */
pp_open_instance(ppg, NULL);
pp_open_globals(ppg, NULL);
if (pp_parse_cmdline(ppi, argc, argv) != 0)
return -1;
......
......@@ -34,7 +34,7 @@ struct pp_runtime_opts default_rt_opts = {
.ttl = PP_DEFAULT_TTL,
};
int pp_open_instance(struct pp_globals *ppg, struct pp_runtime_opts *rt_opts)
int pp_open_globals(struct pp_globals *ppg, struct pp_runtime_opts *rt_opts)
{
/*
* Initialize default data set
......
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