ptp4l: read configuration file immediately after scanning options
This patch moves the call to read the configuration file until just after the options have finished parsing. This is for future patches that will allow configuration file to enable ports with specific settings Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
6157db9ac4
commit
a7db3a1c2b
10
ptp4l.c
10
ptp4l.c
|
@ -203,6 +203,11 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config && config_read(config, &cfg_settings)) {
|
||||||
|
fprintf(stderr, "failed to read configuration file\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!*nports) {
|
if (!*nports) {
|
||||||
fprintf(stderr, "no interface specified\n");
|
fprintf(stderr, "no interface specified\n");
|
||||||
usage(progname);
|
usage(progname);
|
||||||
|
@ -232,11 +237,6 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config && config_read(config, &cfg_settings)) {
|
|
||||||
fprintf(stderr, "failed to read configuration file\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
print_set_verbose(cfg_settings.verbose);
|
print_set_verbose(cfg_settings.verbose);
|
||||||
print_set_syslog(cfg_settings.use_syslog);
|
print_set_syslog(cfg_settings.use_syslog);
|
||||||
print_set_level(cfg_settings.print_level);
|
print_set_level(cfg_settings.print_level);
|
||||||
|
|
Loading…
Reference in New Issue