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