Skip to content

Commit b4d3cae

Browse files
authored
Merge pull request #1964 from eriksjolund/fix-error
krun: fix error code
2 parents ff8f451 + 671740d commit b4d3cae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcrun/handlers/krun.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,10 @@ libkrun_exec (void *cookie, libcrun_container_t *container, const char *pathname
394394
ret = libkrun_configure_vm (ctx_id, handle, &configured, &config_tree, &err);
395395
if (UNLIKELY (ret))
396396
{
397+
int errcode = crun_error_get_errno (&err);
397398
libcrun_error_t *tmp_err = &err;
398399
libcrun_error_write_warning_and_release (NULL, &tmp_err);
399-
error (EXIT_FAILURE, ret, "could not configure krun vm");
400+
error (EXIT_FAILURE, errcode, "could not configure krun vm");
400401
}
401402

402403
/* If we couldn't configure the microVM using KRUN_VM_FILE, fall back to the

0 commit comments

Comments
 (0)