OSDN Git Service

ppc/pnv: improve error logging when a PNOR update fails
authorCédric Le Goater <clg@kaod.org>
Wed, 8 Jan 2020 09:03:48 +0000 (10:03 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 2 Feb 2020 03:07:57 +0000 (14:07 +1100)
Print out the offset at which the error occured.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200108090348.21224-3-clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/pnv_pnor.c

index 060c6e6..c365ee5 100644 (file)
@@ -47,7 +47,8 @@ static void pnv_pnor_update(PnvPnor *s, int offset, int size)
     ret = blk_pwrite(s->blk, offset, s->storage + offset,
                      offset_end - offset, 0);
     if (ret < 0) {
-        error_report("Could not update PNOR: %s", strerror(-ret));
+        error_report("Could not update PNOR offset=0x%" PRIx32" : %s", offset,
+                     strerror(-ret));
     }
 }