Signed-off-by: Peter Schneider <[email protected]>
---
phc2sys.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index c2f0d8e..278ab56 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1317,11 +1317,13 @@ int main(int argc, char *argv[])
char *src_name = NULL, *dst_name = NULL;
struct clock *src, *dst;
struct config *cfg;
+ struct option *opts;
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 ntpshm_segment;
+ int index;
double phc_rate, tmp;
struct node node = {
.sanity_freq_limit = 200000000,
@@ -1338,15 +1340,22 @@ int main(int argc, char *argv[])
return -1;
}
+ opts = config_long_options(cfg);
+
config_set_double(cfg, "pi_proportional_const", KP);
config_set_double(cfg, "pi_integral_const", KI);
/* Process the command line arguments. */
progname = strrchr(argv[0], '/');
progname = progname ? 1+progname : argv[0];
- while (EOF != (c = getopt(argc, argv,
-
"arc:d:f:s:E:P:I:S:F:R:N:O:L:M:i:u:wn:xz:l:t:mqvh"))) {
+ while (EOF != (c = getopt_long(argc, argv,
+
"arc:d:f:s:E:P:I:S:F:R:N:O:L:M:i:u:wn:xz:l:t:mqvh",
+ opts, &index))) {
switch (c) {
+ case 0:
+ if (config_parse_option(cfg, opts[index].name, optarg))
+ goto bad_usage;
+ break;
case 'a':
autocfg = 1;
break;
--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel