From patchwork Wed Aug 3 17:03:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 9261635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6EF9B6048B for ; Wed, 3 Aug 2016 17:05:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C90028174 for ; Wed, 3 Aug 2016 17:05:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5153B28210; Wed, 3 Aug 2016 17:05:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A12D828174 for ; Wed, 3 Aug 2016 17:05:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUzZc-0002ro-Vc; Wed, 03 Aug 2016 17:03:16 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUzZb-0002rY-HO for xen-devel@lists.xenproject.org; Wed, 03 Aug 2016 17:03:15 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id C7/A3-09160-2D322A75; Wed, 03 Aug 2016 17:03:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRWlGSWpSXmKPExsXitHRDpO4l5UX hBueWS1h83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmT7/5lLOhjqejr3c7UwLiNuYuRk0NCwF9i 2d9HLCA2m4COxOMlM9i7GDk4RARUJG7vNQAJMwtUSVy59JkVJCws4CPRt44NJMwCVLHv7VxWE JtXwF1iwazH7BAT5STOH/8JNp1TwEPi8Zk5TCC2EFDN5NmnmCFsFYmPa1dB9QpKnJz5hAVilY TEwRcvmEFWSQhwS/zttp/AyDcLSdUsJFULGJlWMWoUpxaVpRbpGhnqJRVlpmeU5CZm5ugaGhj r5aYWFyemp+YkJhXrJefnbmIEhlM9AwPjDsaevX6HGCU5mJREeSceXBguxJeUn1KZkVicEV9U mpNafIhRhoNDSYJ3gtKicCHBotT01Iq0zBxgYMOkJTh4lER4Z4KkeYsLEnOLM9MhUqcYdTkW/ Li9lkmIJS8/L1VKnHc5SJEASFFGaR7cCFiUXWKUlRLmZWRgYBDiKUgtys0sQZV/xSjOwagkzN sFMoUnM68EbtMroCOYgI44YbAA5IiSRISUVAPjEqZF+pwfvbXes5m4OJl759RMOKomXnO3zXy bljAP17Nl197mpvXpx5VL53xwt1M/8y0g+cSr8sCkQwwXjq6506YcK9TgIbRIb9mhpkkytdaC WrrqloERsovs7szdudaGaWtQ5l031jMnZD7oy26eZ94dxlB/LLvwYeja1u4s82fJ/72f9CqxF GckGmoxFxUnAgAIEAUbrQIAAA== X-Env-Sender: prvs=016c44363=david.vrabel@citrix.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1470243792!53836735!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8475 invoked from network); 3 Aug 2016 17:03:14 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-3.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 3 Aug 2016 17:03:14 -0000 X-IronPort-AV: E=Sophos;i="5.28,466,1464652800"; d="scan'208";a="370134222" From: David Vrabel To: Date: Wed, 3 Aug 2016 18:03:04 +0100 Message-ID: <1470243785-30523-2-git-send-email-david.vrabel@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1470243785-30523-1-git-send-email-david.vrabel@citrix.com> References: <1470243785-30523-1-git-send-email-david.vrabel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Juergen Gross , Boris Ostrovsky , David Vrabel Subject: [Xen-devel] [PATCHv1 1/2] xen/prvicmd: use ENOTTY if the IOCTL is not supported X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The standard return value for ioctl(2) where the cmd is not supported is ENOTTY, not EINVAL. Signed-off-by: David Vrabel --- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index 702040f..ac76bc4 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@ -572,7 +572,7 @@ static long privcmd_ioctl(struct file *file, break; default: - ret = -EINVAL; + ret = -ENOTTY; break; }