From 713d5071d54e11121ea0f1e53581c7ccb904bdcc Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 24 Jul 2020 07:13:04 -0600 Subject: [PATCH] state: don't consider missing state file to be a fatal error --- libifupdown/state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libifupdown/state.c b/libifupdown/state.c index 89ad105..74d0e0c 100644 --- a/libifupdown/state.c +++ b/libifupdown/state.c @@ -45,8 +45,9 @@ lif_state_read_path(struct lif_dict *state, const char *path) FILE *fd = fopen(path, "r"); bool ret; + /* if file cannot be opened, assume an empty state */ if (fd == NULL) - return false; + return true; ret = lif_state_read(state, fd); fclose(fd);