[Git][NTPsec/ntpsec][master] Remove deprecated line discipline flags inherited from Classic.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Feb 3 23:54:39 UTC 2019
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
01904ec6 by Eric S. Raymond at 2019-02-03T23:52:58Z
Remove deprecated line discipline flags inherited from Classic.
- - - - -
8 changed files:
- include/ntp_tty.h
- ntpd/refclock_arbiter.c
- ntpd/refclock_hpgps.c
- ntpd/refclock_jjy.c
- ntpd/refclock_modem.c
- ntpd/refclock_nmea.c
- ntpd/refclock_spectracom.c
- ntpd/refclock_truetime.c
Changes:
=====================================
include/ntp_tty.h
=====================================
@@ -17,20 +17,11 @@
#endif
/*
- * Line discipline flags. The deprecated ones required line discipline
- * or streams modules to be installed/loaded in the kernel and are now
- * ignored. Leave the LDISC_CLK and other deprecated symbols defined
- * until 2013 or 2014 to avoid complicating the use of newer drivers on
- * older ntpd, which is often as easy as dropping in the refclock *.c.
+ * Line discipline flags.
*/
#define LDISC_STD 0x000 /* standard */
-#define LDISC_CLK 0x001 /* deprecated tty_clk \n */
-#define LDISC_CLKPPS 0x002 /* deprecated tty_clk \377 */
-#define LDISC_MODEM 0x004 /* deprecated tty_clk #* */
-#define LDISC_CHU 0x008 /* deprecated */
-#define LDISC_PPS 0x010 /* deprecated */
#define LDISC_RAW 0x020 /* raw binary */
-#define LDISC_REMOTE 0x080 /* remote mode */
#define LDISC_7O1 0x100 /* 7-bit, odd parity for Z3801A */
+#define LDISC_REMOTE 0x080 /* remote mode */
#endif /* GUARD_NTP_TTY_H */
=====================================
ntpd/refclock_arbiter.c
=====================================
@@ -151,7 +151,7 @@ arb_start(
*/
snprintf(device, sizeof(device), DEVICE, unit);
fd = refclock_open(peer->cfg.path ? peer->cfg.path : device,
- peer->cfg.baud ? peer->cfg.baud : SPEED232, LDISC_CLK);
+ peer->cfg.baud ? peer->cfg.baud : SPEED232, LDISC_STD);
if (fd <= 0)
/* coverity[leaked_handle] */
return false;
=====================================
ntpd/refclock_hpgps.c
=====================================
@@ -160,7 +160,7 @@ hpgps_start(
* Default is HP 58503A, mode arg selects HP Z3801A
*/
snprintf(device, sizeof(device), DEVICE, unit);
- ldisc = LDISC_CLK;
+ ldisc = LDISC_STD;
speed = SPEED232;
/* subtype parameter to server config line shares mode slot */
if (1 == peer->cfg.mode) {
=====================================
ntpd/refclock_jjy.c
=====================================
@@ -149,7 +149,7 @@ struct jjyunit {
char unittype ; /* UNITTYPE_XXXXXXXXXX */
short operationmode ; /* Echo Keisokuki LT-2000 */
int linespeed ; /* SPEED232_XXXXXXXXXX */
- short linediscipline ; /* LDISC_CLK or LDISC_RAW */
+ short linediscipline ; /* LDISC_STD or LDISC_RAW */
/* Receiving data */
bool bInitError ; /* Set by jjy_start if any error during initialization */
short iProcessState ; /* JJY_PROCESS_STATE_XXXXXX */
@@ -747,7 +747,7 @@ jjy_receive ( struct recvbuf *rbufp )
}
}
- if ( up->linediscipline == LDISC_CLK ) {
+ if ( up->linediscipline == LDISC_STD ) {
break ;
}
@@ -1076,7 +1076,7 @@ jjy_start_tristate_jjy01 ( int unit, struct peer *peer, struct jjyunit *up )
up->unittype = UNITTYPE_TRISTATE_JJY01 ;
up->linespeed = SPEED232_TRISTATE_JJY01 ;
- up->linediscipline = LDISC_CLK ;
+ up->linediscipline = LDISC_STD ;
return 0 ;
@@ -1550,7 +1550,7 @@ jjy_start_echokeisokuki_lt2000 ( int unit, struct peer *peer, struct jjyunit *up
up->unittype = UNITTYPE_ECHOKEISOKUKI_LT2000 ;
up->linespeed = SPEED232_ECHOKEISOKUKI_LT2000 ;
- up->linediscipline = LDISC_CLK ;
+ up->linediscipline = LDISC_STD ;
up->operationmode = ECHOKEISOKUKI_LT2000_MODE_SWITCHING_CONTINUOUS ;
@@ -1778,7 +1778,7 @@ jjy_start_citizentic_jjy200 ( int unit, struct peer *peer, struct jjyunit *up )
up->unittype = UNITTYPE_CITIZENTIC_JJY200 ;
up->linespeed = SPEED232_CITIZENTIC_JJY200 ;
- up->linediscipline = LDISC_CLK ;
+ up->linediscipline = LDISC_STD ;
return 0 ;
@@ -1964,7 +1964,7 @@ jjy_start_tristate_gpsclock01 ( int unit, struct peer *peer, struct jjyunit *up
up->unittype = UNITTYPE_TRISTATE_GPSCLOCK01 ;
up->linespeed = SPEED232_TRISTATE_GPSCLOCK01 ;
- up->linediscipline = LDISC_CLK ;
+ up->linediscipline = LDISC_STD ;
return 0 ;
=====================================
ntpd/refclock_modem.c
=====================================
@@ -515,7 +515,7 @@ modem_timeout(
snprintf(device, sizeof(device), DEVICE, up->unit);
fd = refclock_open(peer->cfg.path ? peer->cfg.path : device,
peer->cfg.baud ? peer->cfg.baud : SPEED232,
- LDISC_MODEM | LDISC_RAW | LDISC_REMOTE);
+ LDISC_RAW | LDISC_REMOTE);
if (fd < 0) {
msyslog(LOG_ERR, "REFCLOCK: modem: open fails %m");
return;
=====================================
ntpd/refclock_nmea.c
=====================================
@@ -478,8 +478,8 @@ nmea_start(
}
path = device;
}
- /* Open serial port. Use CLK line discipline, if available. */
- pp->io.fd = refclock_open(path, baudrate, LDISC_CLK);
+ /* Open serial port. */
+ pp->io.fd = refclock_open(path, baudrate, LDISC_STD);
if (0 > pp->io.fd) {
msyslog(LOG_ERR, "REFCLOCK: %s NMEA device open(%s) failed",
=====================================
ntpd/refclock_spectracom.c
=====================================
@@ -177,7 +177,7 @@ spectracom_start(
snprintf(device, sizeof(device), DEVICE, unit);
fd = refclock_open(peer->cfg.path ? peer->cfg.path : device,
peer->cfg.baud ? peer->cfg.baud : SPEED232,
- LDISC_CLK);
+ LDISC_STD);
if (fd <= 0)
/* coverity[leaked_handle] */
return false;
=====================================
ntpd/refclock_truetime.c
=====================================
@@ -209,7 +209,7 @@ true_start(
*/
snprintf(device, sizeof(device), DEVICE, unit);
fd = refclock_open(peer->cfg.path ? peer->cfg.path : device,
- peer->cfg.baud ? peer->cfg.baud : SPEED232, LDISC_CLK);
+ peer->cfg.baud ? peer->cfg.baud : SPEED232, LDISC_STD);
if (fd <= 0)
/* coverity[leaked_handle] */
return false;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/01904ec6f43d1f5a8601e95d22f58755250b2440
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/01904ec6f43d1f5a8601e95d22f58755250b2440
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190203/23f22608/attachment-0001.html>
More information about the vc
mailing list