Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/ntp/ntpd/ntp_refclock.c
Show First 20 Lines • Show All 726 Lines • ▼ Show 20 Lines | |||||
* refclock_open - open serial port for reference clock | * refclock_open - open serial port for reference clock | ||||
* | * | ||||
* This routine opens a serial port for I/O and sets default options. It | * This routine opens a serial port for I/O and sets default options. It | ||||
* returns the file descriptor if successful, or logs an error and | * returns the file descriptor if successful, or logs an error and | ||||
* returns -1. | * returns -1. | ||||
*/ | */ | ||||
int | int | ||||
refclock_open( | refclock_open( | ||||
char *dev, /* device name pointer */ | const char *dev, /* device name pointer */ | ||||
u_int speed, /* serial port speed (code) */ | u_int speed, /* serial port speed (code) */ | ||||
u_int lflags /* line discipline flags */ | u_int lflags /* line discipline flags */ | ||||
) | ) | ||||
{ | { | ||||
int fd; | int fd; | ||||
int omode; | int omode; | ||||
#ifdef O_NONBLOCK | #ifdef O_NONBLOCK | ||||
char trash[128]; /* litter bin for old input data */ | char trash[128]; /* litter bin for old input data */ | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 587 Lines • Show Last 20 Lines |