mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
error: Clean up errors with embedded newlines (again)
The arguments of error_report() should yield a short error string without newlines. A few places try to print additional help after the error message by embedding newlines in the error string. That's nice, but let's do it the right way. Commit474c213cleaned up some, but they keep coming back. Offenders tracked down with the Coccinelle semantic patch from commit312fd5f. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Markus Armbruster <armbru@pond.sub.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
bf89e87427
commit
433672b0d5
3 changed files with 7 additions and 8 deletions
|
|
@ -2063,9 +2063,9 @@ void kvm_device_access(int fd, int group, uint64_t attr,
|
|||
write ? KVM_SET_DEVICE_ATTR : KVM_GET_DEVICE_ATTR,
|
||||
&kvmattr);
|
||||
if (err < 0) {
|
||||
error_report("KVM_%s_DEVICE_ATTR failed: %s\n"
|
||||
"Group %d attr 0x%016" PRIx64, write ? "SET" : "GET",
|
||||
strerror(-err), group, attr);
|
||||
error_report("KVM_%s_DEVICE_ATTR failed: %s",
|
||||
write ? "SET" : "GET", strerror(-err));
|
||||
error_printf("Group %d attr 0x%016" PRIx64, group, attr);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue