diff --git a/src/common/options.c b/src/common/options.c --- a/src/common/options.c +++ b/src/common/options.c @@ -21,6 +21,9 @@ #include "options.h" +/* privat-ish files for components we need to config */ +#include "libremoteio.h" + #include #include #include @@ -71,10 +74,22 @@ int options_init(int argc, char *argv[], return 1; } memset((*allopts)->data, '\0', sizeof(struct options_common_data)); + + (*allopts)->remoteio = malloc(sizeof(struct remoteio_opts)); + if(!(*allopts)->data) + { + perror("malloc"); + free(configfile); + free((*allopts)->data); + free(*allopts); + return 1; + } + memset((*allopts)->remoteio, '\0', sizeof(struct remoteio_opts)); - /* Conf File Parser */ + cfg_opt_t common_opts[] = { + CFG_SIMPLE_STR("ssh-command", &(*allopts)->remoteio->ssh_command), CFG_END() }; @@ -142,6 +157,7 @@ int options_free(struct options_common * cfg_free(opts->data->cfg); + free(opts->remoteio); free(opts->data); free(opts);