From patchwork Mon Jun 24 06:39:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 253640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0C5952C0503 for ; Mon, 24 Jun 2013 16:42:28 +1000 (EST) Received: from localhost ([::1]:53715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0Tp-0007gG-VT for incoming@patchwork.ozlabs.org; Mon, 24 Jun 2013 02:42:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0RW-0004B7-45 for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur0RU-0006yM-2C for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:40:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0RT-0006xr-R5; Mon, 24 Jun 2013 02:39:59 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5O6dxEB002221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 Jun 2013 02:39:59 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5O6dwg6010913; Mon, 24 Jun 2013 02:39:58 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id E20784173E; Mon, 24 Jun 2013 08:39:56 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 24 Jun 2013 08:39:48 +0200 Message-Id: <1372055996-4072-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1372055996-4072-1-git-send-email-kraxel@redhat.com> References: <1372055996-4072-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org, Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 05/13] qemu-char: use more specific error_setg_* variants X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- qemu-char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ee7c70e..cfc68cd 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2604,7 +2604,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; } @@ -3536,7 +3536,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; }