From patchwork Fri Apr 7 22:20:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 748492 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 3w0Ddy5wVVz9s7C for ; Sat, 8 Apr 2017 08:24:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gSZDCWct"; dkim-atps=neutral Received: from localhost ([::1]:52792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwcJ2-0001nD-Ac for incoming@patchwork.ozlabs.org; Fri, 07 Apr 2017 18:24:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwcG3-00086f-TQ for qemu-devel@nongnu.org; Fri, 07 Apr 2017 18:21:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwcG3-000575-2N for qemu-devel@nongnu.org; Fri, 07 Apr 2017 18:21:31 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:32961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cwcG2-00056k-Uo for qemu-devel@nongnu.org; Fri, 07 Apr 2017 18:21:31 -0400 Received: by mail-qt0-x242.google.com with SMTP id c45so3675212qtb.0 for ; Fri, 07 Apr 2017 15:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5CUxhrJmWSMfvt+gcfo83kV5Tf30FCyHNox8xlrihQ4=; b=gSZDCWctZSxIk8f2+kmF9JpB9XchmkDvHvIdwhOsvtA/zOIyAUaxOBaEDqZFk1PhH5 NPg6Yj40LeIWZ1ZwM9BvjEExE1RoAnQXPom0E26OHwW0BJ5vCGELVHOmgZMm+3t8vYUk ExtjkRvirvgzLSpwkB9KqjgBvB499Ia46PnjjnHFSc4Jh/sckvm74S4HVxo9Wvr5KWP+ dRY7udZQ1oGytXnPyW0OAFY2oeRkfo04l499mH/78jFES9q8YHf7nN4iBFpndH3wi59n z6c+SoGOyinryz6aiFZOA5goRTM5VhOYcxnwtCkW9WnsgYHPRv4AMhtTCs9Xf1OxWBQC YkLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5CUxhrJmWSMfvt+gcfo83kV5Tf30FCyHNox8xlrihQ4=; b=ZudpN6GkMYm1473AIzBVYBRli4DM5RNSkOUFeoqLugxZhtKREtNb8JC7VI8mbWO83Z tHbZOQK7LQivYQfSzUY59pgaCdvs7Wjpfb+TkVw2DUAnJZ0Fsgc6pcpGdJx9FdIkKxEk XsX6v3H3mMITBtw99TbZpyYJ1Qlgf1ZWKSYtWPxsyr5jDetBnRKNVshgEihzuNyD/ois x8sS0cPupx8pXrDFsC9yTNsJp+Ch8nEGYA/m8t4N1l0d0ZzLy/SaBJ2PVRN/jZHgr9sY EeXvwIZM/QeU1+FJRPGNFC8pQJPBpo64DvXyTcGaoxSPlIA3wIauVY6cxfGDI4cdkHxw oj9A== X-Gm-Message-State: AFeK/H29ZL6w8bqR1wPp6dS5eTZ3CYVwEaOz6mafWj81/MblpD7N7Pd0oWYEU5cTCFdgig== X-Received: by 10.200.37.13 with SMTP id 13mr41523057qtm.209.1491603690495; Fri, 07 Apr 2017 15:21:30 -0700 (PDT) Received: from yoga.lan ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id d133sm1442146qke.9.2017.04.07.15.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Apr 2017 15:21:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Roth Date: Fri, 7 Apr 2017 19:20:16 -0300 Message-Id: <20170407222016.15308-5-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170407222016.15308-1-f4bug@amsat.org> References: <20170407222016.15308-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH v2 4/4] qga: improve error handling in transfer_memory_block X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Suggested-by: Michael Roth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Roth --- Michael should I use Signed-off-by instead of the Suggested-by (since it is your code)? qga/commands-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index fc45102a1e..ca5a24b2c9 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -2128,6 +2128,9 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk, if (errno == ENOENT) { result->response = GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED; + } else { + result->response = + GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED; } goto out1; }