use the new options_t class
This commit is contained in:
+4
-1
@@ -234,6 +234,8 @@ int main(int argc, char **argv)
|
|||||||
time_t validity = 0;
|
time_t validity = 0;
|
||||||
int status = 1;
|
int status = 1;
|
||||||
|
|
||||||
|
options_t *options = options_create();
|
||||||
|
|
||||||
/* enable openac debugging hook */
|
/* enable openac debugging hook */
|
||||||
dbg = openac_dbg;
|
dbg = openac_dbg;
|
||||||
|
|
||||||
@@ -300,7 +302,7 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
snprintf(path, BUF_LEN, "%s/%s", OPENAC_PATH, optarg);
|
snprintf(path, BUF_LEN, "%s/%s", OPENAC_PATH, optarg);
|
||||||
}
|
}
|
||||||
if (!optionsfrom(path, &argc, &argv, optind))
|
if (!options->from(options, path, &argc, &argv, optind))
|
||||||
{
|
{
|
||||||
status = 1;
|
status = 1;
|
||||||
goto end;
|
goto end;
|
||||||
@@ -509,5 +511,6 @@ end:
|
|||||||
free(serial.ptr);
|
free(serial.ptr);
|
||||||
closelog();
|
closelog();
|
||||||
dbg = dbg_default;
|
dbg = dbg_default;
|
||||||
|
options->destroy(options);
|
||||||
exit(status);
|
exit(status);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user