From patchwork Mon Mar 2 19:03:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 445408 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5300D1400EA for ; Tue, 3 Mar 2015 06:18:53 +1100 (AEDT) Received: from localhost ([::1]:59104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSVrf-0005RX-G8 for incoming@patchwork.ozlabs.org; Mon, 02 Mar 2015 14:18:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSVrF-0003Mt-Rs for qemu-devel@nongnu.org; Mon, 02 Mar 2015 14:18:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSVr8-0000ck-9A for qemu-devel@nongnu.org; Mon, 02 Mar 2015 14:18:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSVr8-0000cc-2N for qemu-devel@nongnu.org; Mon, 02 Mar 2015 14:18:18 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t22JIHJC016676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Mar 2015 14:18:17 -0500 Received: from gimli.home (ovpn-113-210.phx2.redhat.com [10.3.113.210]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t22J3Xum023004; Mon, 2 Mar 2015 14:03:33 -0500 From: Alex Williamson To: qemu-devel@nongnu.org Date: Mon, 02 Mar 2015 12:03:33 -0700 Message-ID: <20150302190333.2706.8809.stgit@gimli.home> In-Reply-To: <20150302190237.2706.61507.stgit@gimli.home> References: <20150302190237.2706.61507.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Alexey Kardashevskiy , alex.williamson@redhat.com Subject: [Qemu-devel] [PULL 1/4] vfio: Add ioctl number to error report 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 From: Alexey Kardashevskiy This makes the error report more informative. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson --- hw/vfio/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c5d1551..c9df08d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -932,8 +932,8 @@ static int vfio_container_do_ioctl(AddressSpace *as, int32_t groupid, if (group->container) { ret = ioctl(container->fd, req, param); if (ret < 0) { - error_report("vfio: failed to ioctl container: ret=%d, %s", - ret, strerror(errno)); + error_report("vfio: failed to ioctl %d to container: ret=%d, %s", + _IOC_NR(req) - VFIO_BASE, ret, strerror(errno)); } }