|
|
9ae3a8 |
From 54cee6b36249a4486cdef86fe107fd2fbf8885fd Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 14 Oct 2013 13:35:14 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 07/18] qemu-char: use more specific error_setg_* variants
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1381757723-23134-7-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 54859
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 06/15] qemu-char: use more specific error_setg_* variants
|
|
|
9ae3a8 |
Bugzilla: 922010
|
|
|
9ae3a8 |
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
9ae3a8 |
(cherry picked from commit 20c397607cb54905f452921259b4baa9c8a1d008)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
qemu-char.c | 4 ++--
|
|
|
9ae3a8 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
qemu-char.c | 4 ++--
|
|
|
9ae3a8 |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/qemu-char.c b/qemu-char.c
|
|
|
9ae3a8 |
index ddc3dca..f783a87 100644
|
|
|
9ae3a8 |
--- a/qemu-char.c
|
|
|
9ae3a8 |
+++ b/qemu-char.c
|
|
|
9ae3a8 |
@@ -2624,7 +2624,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay,
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
memset(&ss, 0, ss_len);
|
|
|
9ae3a8 |
if (getsockname(fd, (struct sockaddr *) &ss, &ss_len) != 0) {
|
|
|
9ae3a8 |
- error_setg(errp, "getsockname: %s", strerror(errno));
|
|
|
9ae3a8 |
+ error_setg_errno(errp, errno, "getsockname");
|
|
|
9ae3a8 |
return NULL;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -3557,7 +3557,7 @@ static int qmp_chardev_open_file_source(char *src, int flags,
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
TFR(fd = qemu_open(src, flags, 0666));
|
|
|
9ae3a8 |
if (fd == -1) {
|
|
|
9ae3a8 |
- error_setg(errp, "open %s: %s", src, strerror(errno));
|
|
|
9ae3a8 |
+ error_setg_file_open(errp, errno, src);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
return fd;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|