On 03/19/2018 04:31 PM, Wolfram Sang wrote:
Replace the ERR macro with error_report() because fprintf is deprecated.
This also fixes the prefix printed out twice.

Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com>
---
  hw/nvram/eeprom_at24c.c | 17 ++++++-----------
  1 file changed, 6 insertions(+), 11 deletions(-)


@@ -63,8 +61,7 @@ int at24c_eeprom_event(I2CSlave *s, enum i2c_event event)
          if (ee->blk && ee->changed) {
              int len = blk_pwrite(ee->blk, 0, ee->mem, ee->rsize, 0);
              if (len != ee->rsize) {
-                ERR(TYPE_AT24C_EE
-                        " : failed to write backing file\n");
+                error_report("failed to write backing file\n");

Drop the \n here and elsewhere in your patch; error_report() already does that for you.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to