From c5723edc18c5027f32ef65964ac6c857b6a837a1 Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Fri, 27 Oct 2023 16:00:06 +0200 Subject: [PATCH] src/bundle: clean up printouts Also use 'Resign' instead of 'Reading' Signed-off-by: Enrico Joerns --- src/bundle.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/bundle.c b/src/bundle.c index e130955a7..5428f930e 100644 --- a/src/bundle.c +++ b/src/bundle.c @@ -707,8 +707,6 @@ static GBytes *generate_bundle_signature(const gchar *bundlename, RaucManifest * g_assert_nonnull(r_context()->keypath); if (manifest->bundle_format == R_MANIFEST_FORMAT_PLAIN) { - g_print("Creating bundle in 'plain' format\n"); - if (!check_manifest_internal(manifest, &ierror)) { g_propagate_prefixed_error( error, @@ -730,8 +728,6 @@ static GBytes *generate_bundle_signature(const gchar *bundlename, RaucManifest * return NULL; } } else if ((manifest->bundle_format == R_MANIFEST_FORMAT_VERITY) || (manifest->bundle_format == R_MANIFEST_FORMAT_CRYPT)) { - g_print("Creating bundle in '%s' format\n", r_manifest_bundle_format_to_str(manifest->bundle_format)); - if (!check_manifest_external(manifest, &ierror)) { g_propagate_prefixed_error( error, @@ -940,6 +936,8 @@ gboolean create_bundle(const gchar *bundlename, const gchar *contentdir, GError goto out; } + g_print("Creating '%s' format bundle\n", r_manifest_bundle_format_to_str(manifest->bundle_format)); + /* print warnings collected while parsing */ for (guint i = 0; i < manifest->warnings->len; i++) { g_print("%s\n", (gchar *)g_ptr_array_index(manifest->warnings, i)); @@ -1087,16 +1085,7 @@ gboolean resign_bundle(RaucBundle *bundle, const gchar *outpath, GError **error) manifest = loaded_manifest; } - if (manifest->bundle_format == R_MANIFEST_FORMAT_PLAIN) { - g_print("Reading bundle in 'plain' format\n"); - } else if (manifest->bundle_format == R_MANIFEST_FORMAT_VERITY || manifest->bundle_format == R_MANIFEST_FORMAT_CRYPT) { - g_print("Reading bundle in '%s' format\n", manifest->bundle_format == R_MANIFEST_FORMAT_VERITY ? "verity" : "crypt"); - g_assert(bundle->size > (goffset)manifest->bundle_verity_size); - } else { - g_error("unsupported bundle format"); - res = FALSE; - goto out; - } + g_print("Resigning '%s' format bundle\n", r_manifest_bundle_format_to_str(manifest->bundle_format)); res = truncate_bundle(bundle->path, outpath, bundle->size, &ierror); if (!res) {