Replaced usage of variable 'verbose' with
struct config item 'verbose'. Original variable removed.

Signed-off-by: Peter Schneider <pe...@psch.de>
---
 phc2sys.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/phc2sys.c b/phc2sys.c
index b402575..edbdb85 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1345,7 +1345,7 @@ int main(int argc, char *argv[])
        int autocfg = 0, rt = 0;
        int c, domain_number = 0, pps_fd = -1;
        int r = -1, wait_sync = 0;
-       int print_level = LOG_INFO, use_syslog = 1, verbose = 0;
+       int print_level = LOG_INFO, use_syslog = 1;
        int ntpshm_segment;
        double phc_rate, tmp;
        struct node node = {
@@ -1492,7 +1492,9 @@ int main(int argc, char *argv[])
                        }
                        break;
                case 'm':
-                       verbose = 1;
+                       if (config_set_int(cfg, "verbose", 1)) {
+                               goto end;
+                       }
                        break;
                case 'q':
                        use_syslog = 0;
@@ -1534,7 +1536,7 @@ int main(int argc, char *argv[])
 
        print_set_progname(progname);
        print_set_tag(config_get_string(cfg, NULL, "message_tag"));
-       print_set_verbose(verbose);
+       print_set_verbose(config_get_int(cfg, NULL, "verbose"));
        print_set_syslog(use_syslog);
        print_set_level(config_get_int(cfg, NULL, "logging_level"));
 
-- 
2.14.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to