config: remove the last remaining legacy item.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
e82462e295
commit
13aec6d133
3
config.h
3
config.h
|
@ -44,9 +44,6 @@ struct config {
|
||||||
|
|
||||||
/* hash of all non-legacy items */
|
/* hash of all non-legacy items */
|
||||||
struct hash *htab;
|
struct hash *htab;
|
||||||
|
|
||||||
/* the rest are legacy fields */
|
|
||||||
struct default_ds dds;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int config_read(char *name, struct config *cfg);
|
int config_read(char *name, struct config *cfg);
|
||||||
|
|
8
ptp4l.c
8
ptp4l.c
|
@ -43,6 +43,8 @@ static struct config cfg_settings = {
|
||||||
.interfaces = STAILQ_HEAD_INITIALIZER(cfg_settings.interfaces),
|
.interfaces = STAILQ_HEAD_INITIALIZER(cfg_settings.interfaces),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct default_ds ptp4l_dds;
|
||||||
|
|
||||||
static void usage(char *progname)
|
static void usage(char *progname)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
@ -82,8 +84,8 @@ int main(int argc, char *argv[])
|
||||||
struct interface *iface;
|
struct interface *iface;
|
||||||
struct clock *clock;
|
struct clock *clock;
|
||||||
struct config *cfg = &cfg_settings;
|
struct config *cfg = &cfg_settings;
|
||||||
struct default_ds *dds = &cfg_settings.dds;
|
struct default_ds *dds = &ptp4l_dds;
|
||||||
struct defaultDS *ds = &cfg_settings.dds.dds;
|
struct defaultDS *ds = &ptp4l_dds.dds;
|
||||||
int phc_index = -1, print_level, required_modes = 0;
|
int phc_index = -1, print_level, required_modes = 0;
|
||||||
unsigned char oui[OUI_LEN];
|
unsigned char oui[OUI_LEN];
|
||||||
|
|
||||||
|
@ -339,7 +341,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
clock = clock_create(&cfg_settings,
|
clock = clock_create(&cfg_settings,
|
||||||
phc_index, &cfg_settings.interfaces,
|
phc_index, &cfg_settings.interfaces,
|
||||||
&cfg_settings.dds);
|
&ptp4l_dds);
|
||||||
if (!clock) {
|
if (!clock) {
|
||||||
fprintf(stderr, "failed to create a clock\n");
|
fprintf(stderr, "failed to create a clock\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue