Merge pull request #35 from ifupdown-ng/feature/bsearch-parsing

interface config parser rewrite
This commit is contained in:
Ariadne Conill 2020-08-24 04:41:06 -06:00 committed by GitHub
commit 68021bc652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 256 additions and 153 deletions

View file

@ -275,6 +275,8 @@ ifquery_main(int argc, char *argv[])
struct lif_dict state = {};
struct lif_dict collection = {};
lif_interface_collection_init(&collection);
if (!lif_state_read_path(&state, exec_opts.state_file))
{
fprintf(stderr, "%s: could not parse %s\n", argv0, exec_opts.state_file);

View file

@ -163,6 +163,8 @@ ifupdown_main(int argc, char *argv[])
struct lif_dict state = {};
struct lif_dict collection = {};
lif_interface_collection_init(&collection);
if (!lif_state_read_path(&state, exec_opts.state_file))
{
fprintf(stderr, "%s: could not parse %s\n", argv0, exec_opts.state_file);