Skip to content

Commit

Permalink
Fix issues in libocispec
Browse files Browse the repository at this point in the history
Signed-off-by: Sourav Moitra <[email protected]>
  • Loading branch information
xw19 committed Dec 28, 2024
1 parent 33ba273 commit 4de3033
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libocispec
7 changes: 2 additions & 5 deletions src/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,10 @@ crun_command_create (struct crun_global_arguments *global_args, int argc, char *
ret = init_libcrun_context (&crun_context, argv[first_arg], global_args, err);
if (UNLIKELY (ret < 0))
return ret;

libcrun_error(0, "config path %s\n", config_file);

container = libcrun_container_load_from_file (config_file, err);
if (container == NULL)
libcrun_fail_with_error (0, "error loading config.json XX");

libcrun_debug ("Using bundle: %s", bundle);
libcrun_fail_with_error (0, "error loading config.json");
crun_context.bundle = bundle;
if (getenv ("LISTEN_FDS"))
{
Expand Down
2 changes: 1 addition & 1 deletion src/crun.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ print_version (FILE *stream, struct argp_state *state arg_unused)

libcrun_handler_manager_print_feature_tags (libcrun_get_handler_manager (), stream);

fprintf (stream, "+ json_t\n");
fprintf (stream, "+JANSSON\n");
}

static error_t
Expand Down
1 change: 0 additions & 1 deletion src/libcrun/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ libcrun_container_load_from_file (const char *path, libcrun_error_t *err)
cleanup_free char *oci_error = NULL;
libcrun_debug ("Loading container from config file: %s", path);
container_def = runtime_spec_schema_config_schema_parse_file (path, NULL, &oci_error);
libcrun_error (0, "Not sure %s - %i - %s\n", path, container_def == NULL, oci_error);
if (container_def == NULL)
{
crun_make_error (err, 0, "load `%s`: %s", path, oci_error);
Expand Down

0 comments on commit 4de3033

Please sign in to comment.