From 0023912e1cf61a637dea04ca07ca58b8ce5075f7 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 22 Nov 2016 13:43:17 +0000 Subject: [PATCH] trivial: Be more helpful when failing to detect the firmware kind --- src/fu-rom.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fu-rom.c b/src/fu-rom.c index 4520103c3..eeda12099 100644 --- a/src/fu-rom.c +++ b/src/fu-rom.c @@ -667,10 +667,13 @@ fu_rom_load_data (FuRom *rom, /* nothing */ if (priv->kind == FU_ROM_KIND_UNKNOWN) { - g_set_error_literal (error, - FWUPD_ERROR, - FWUPD_ERROR_INVALID_FILE, - "Failed to detect firmware kind"); + g_autofree gchar *str = NULL; + str = fu_rom_get_hex_dump (buffer + hdr_sz, 0x32); + g_set_error (error, + FWUPD_ERROR, + FWUPD_ERROR_INVALID_FILE, + "Failed to detect firmware kind from [%s]", + str); return FALSE; }