[Git][NTPsec/ntpsec][master] Re-introduce subtype keyword without the lossage.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Jul 7 08:56:35 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
3d878b19 by Eric S. Raymond at 2016-07-07T04:55:37-04:00
Re-introduce subtype keyword without the lossage.

Looks like the scanner doesn't like it when you try to alias multiple strings
to one value.

Logging live-tested at tis revision works.

- - - - -


3 changed files:

- ntpd/keyword-gen.c
- ntpd/ntp_config.c
- ntpd/ntp_parser.y


Changes:

=====================================
ntpd/keyword-gen.c
=====================================
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -91,6 +91,7 @@ struct key_tok ntp_keywords[] = {
 { "preempt",		T_Preempt,		FOLLBY_TOKEN },
 { "true",		T_True,			FOLLBY_TOKEN },
 { "prefer",		T_Prefer,		FOLLBY_TOKEN },
+{ "subtype",		T_Subtype,		FOLLBY_TOKEN },
 { "ttl",		T_Ttl,			FOLLBY_TOKEN },
 { "version",		T_Version,		FOLLBY_TOKEN },
 { "xleave",		T_Xleave,		FOLLBY_TOKEN },


=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -731,6 +731,7 @@ create_peer_node(
 			}
 			break;
 
+		case T_Subtype:
 		case T_Mode:
 			my_node->ttl = option->value.u;
 			break;


=====================================
ntpd/ntp_parser.y
=====================================
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -220,6 +220,7 @@
 %token	<Integer>	T_Stepfwd
 %token	<Integer>	T_Stepout
 %token	<Integer>	T_Stratum
+%token	<Integer>	T_Subtype
 %token	<String>	T_String		/* not a token */
 %token	<Integer>	T_Sys
 %token	<Integer>	T_Sysstats
@@ -482,6 +483,7 @@ option_int_keyword
 	|	T_Maxpoll
 	|	T_Ttl
 	|	T_Mode
+	|	T_Subtype
 	|	T_Version
 	;
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/3d878b19088e683e1fbfa50bb22556a5c8ab6e24
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160707/4770fede/attachment.html>


More information about the vc mailing list