refclock: check all driver options

In each driver provide a list of supported options and abort when an
unknown option is specified in the refclock directive.
This commit is contained in:
Miroslav Lichvar
2019-04-18 15:56:15 +02:00
parent 34e9dd13ce
commit a78031ce0d
6 changed files with 58 additions and 14 deletions

View File

@@ -48,12 +48,15 @@ struct pps_instance {
};
static int pps_initialise(RCL_Instance instance) {
const char *options[] = {"clear", NULL};
pps_handle_t handle;
pps_params_t params;
struct pps_instance *pps;
int fd, edge_clear, mode;
char *path;
RCL_CheckDriverOptions(instance, options);
path = RCL_GetDriverParameter(instance);
edge_clear = RCL_GetDriverOption(instance, "clear") ? 1 : 0;