Skip to content

Commit e72c2b0

Browse files
Petr Hanzlikmichalvasko
authored andcommitted
cli BUGFIX fix context creation in store_config
1 parent ad6b4c1 commit e72c2b0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cli/configuration.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ load_config(void)
329329
config_file = NULL;
330330
goto cleanup;
331331
} else if (eaccess(config_file, F_OK) && (errno == ENOENT)) {
332-
ERROR(__func__, "No saved configuration.");
333332
goto cleanup;
334333
}
335334

@@ -495,7 +494,7 @@ store_config(void)
495494
struct lys_module *cli = NULL;
496495
const char *str;
497496

498-
if (ly_ctx_new(NULL, 0, &ctx)) {
497+
if (ly_ctx_new(ly_yang_module_dir(), 0, &ctx)) {
499498
ERROR(__func__, "Failed to create context.");
500499
ERROR(__func__, "Unable to store configuration due to the previous error.");
501500
goto cleanup;

0 commit comments

Comments
 (0)