From patchwork Fri May 6 02:38:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 9028821 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7310BBF29F for ; Fri, 6 May 2016 02:39:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7EA320272 for ; Fri, 6 May 2016 02:39:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4598A20108 for ; Fri, 6 May 2016 02:39:13 +0000 (UTC) Received: from localhost ([::1]:56201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayVfZ-0001Jh-Ff for patchwork-qemu-devel@patchwork.kernel.org; Thu, 05 May 2016 22:39:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayVfK-00010I-7K for qemu-devel@nongnu.org; Thu, 05 May 2016 22:39:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayVf8-0004YA-Kz for qemu-devel@nongnu.org; Thu, 05 May 2016 22:38:48 -0400 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]:35711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayVf7-0004R1-Dy for qemu-devel@nongnu.org; Thu, 05 May 2016 22:38:42 -0400 Received: by mail-io0-x242.google.com with SMTP id u185so12771414iod.2 for ; Thu, 05 May 2016 19:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=jdSoNlJB3WKnsYpVYjCEVDj385bxbyIHZuBl60NApKE=; b=dtym2ci3rzyXo7gL8QCEf1pE/h5pjhUsK4P2/ZW76506CxlS48Io7TjsBNTUkLlYOL gDEGHCRuKphLU/nEyKIY+hDDAzFyViiCZ3sbmlA6BLi5nusVDCRBqS7XLinddDJm+nA0 8fFciLvSGMEi7QY4OGcUz+I8a7VICZm07IWXWs0ENoTodVp4ntfxDQANQYQhMh2sOmo6 W0LsNTc14JcmfLS1VpU9wXTzg/VJjCGRcfRKnbU7ZpPL6EsjdsMXUv7vw0VxR8RmLjrj 1XUXwSAC/XYpLVWe7pYRkZ/EOl/e5eXkU/HqWwg5TK2/9j1292aq+MV6KkLbZdr+KmUq Xkag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject:date :message-id:cc:to:mime-version; bh=jdSoNlJB3WKnsYpVYjCEVDj385bxbyIHZuBl60NApKE=; b=O1OrGwHC7LOmIho/zE55JPBZJsqDYmCupIZrseWmZTBj22D01XJ+3ZeWbb5SLiP1zk apRTAK2q3TWZOABqmlpUSFRhuuNZNitJhT6vJWdBUs05fCe3gidHw/ppCNgYEkAWUhKb qazEGviG1PVaJXICg97D7563KupBYTzSElwB5rrj6ijN8YDEWwr4bAIlnk/nqfUyNxcQ 74IQlTCy3HvXqcyeGRqpts57tfNIZ21GshZcZYx8j9cvUEmE3n6Rs17kzvNVXeNFwCJT PhZjJoZQxlulH9bW1am5DApIgnRcLfCyPe/0HNpM1PISRRzpujZEsnC2SdoBZ3osHIBL nK6A== X-Gm-Message-State: AOPr4FWwq5vWDWqjMJ65VvzJtNqKhC0JGIuf0RRmCdam+rFVqtd8nq5NEHHj+DjTfG2umg== X-Received: by 10.107.62.197 with SMTP id l188mr20836127ioa.185.1462502303821; Thu, 05 May 2016 19:38:23 -0700 (PDT) Received: from [192.168.0.5] (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id i14sm5565815iod.34.2016.05.05.19.38.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 May 2016 19:38:22 -0700 (PDT) From: Programmingkid Date: Thu, 5 May 2016 22:38:22 -0400 Message-Id: To: Peter Maydell , Gerd Hoffmann Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::242 Subject: [Qemu-devel] [PATCH v3 4/5] adb.c: prevent NO_KEY value from going to guest 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: qemu-devel qemu-devel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The NO_KEY value should not be sent to the guest. This patch drops that value. Signed-off-by: John Arbuckle --- hw/input/adb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/input/adb.c b/hw/input/adb.c index 6d4f4dc..37728b3 100644 --- a/hw/input/adb.c +++ b/hw/input/adb.c @@ -424,6 +424,9 @@ static void adb_keyboard_event(DeviceState *dev, QemuConsole *src, return; } keycode = qcode_to_adb_keycode[qcode]; + if (keycode == NO_KEY) { /* We don't want to send this to the guest */ + return; + } if (evt->u.key.data->down == false) { /* if key release event */ keycode = keycode | 0x80; /* create keyboard break code */