Strip trailing '\n' from error_report()'s first argument

error_report() prepends location, and appends a newline.  The message
constructed from the arguments should not contain a newline.  Fix the
obvious offenders.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
Markus Armbruster 2011-06-22 14:03:54 +02:00 committed by Stefan Hajnoczi
parent db78ef5b0a
commit 6daf194dde
16 changed files with 76 additions and 74 deletions

View file

@ -671,7 +671,7 @@ static int block_load(QEMUFile *f, void *opaque, int version_id)
bs_prev = bs;
total_sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
if (total_sectors <= 0) {
error_report("Error getting length of block device %s\n",
error_report("Error getting length of block device %s",
device_name);
return -EINVAL;
}