From a7db3a1c2b98d5ffdb2473b491d28e70c428cc46 Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Mon, 20 Aug 2012 10:57:11 -0700 Subject: [PATCH] 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 --- ptp4l.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ptp4l.c b/ptp4l.c index c64aa05..3724999 100644 --- a/ptp4l.c +++ b/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) { fprintf(stderr, "no interface specified\n"); usage(progname); @@ -232,11 +237,6 @@ int main(int argc, char *argv[]) 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_syslog(cfg_settings.use_syslog); print_set_level(cfg_settings.print_level);