From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7597C433F5 for ; Mon, 24 Jan 2022 06:22:40 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nBskR-00038V-OC for kernelnewbies@archiver.kernel.org; Mon, 24 Jan 2022 01:22:39 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nBsik-00015u-UM for kernelnewbies@kernelnewbies.org; Mon, 24 Jan 2022 01:20:55 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4D2B75C0032; Mon, 24 Jan 2022 01:20:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 24 Jan 2022 01:20:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=9BxEcAQHicvwDL6jQpYraUqec8vnd+l72LX15H Hy9aA=; b=GJMYnFDvzZ5PbJ+nZi56P+aF9H75lpduBrkRk5l/jI3RQMsvF+y4+L Sgrw/WjHWN4aoexOK6AvSlA5FVvlrO5QpcgrgoDqnvOo4syayg1T61angS3W8wzM Twn7e4MoBdjvGIBuio8Q86L5h2faz4O42CChRleuVbVS6ql/oaCnr/KT/73XDdrS aPgZQDDr5xRU9oRsKMlr6R3iTFDkZ4zUJisqo1fPA+zacjJziFsbO6ZzxuH27jSG k/GawlWIgRvTSgPKYGXUFWJAjm5V13T8P3FZ+7h3LtDBFQEVHpiOdpF4elBlWuQ1 iLfN5rYLVsT8zpH2BQabsbIFEoGV+LBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=9BxEcAQHicvwDL6jQ pYraUqec8vnd+l72LX15HHy9aA=; b=lz2lGGqMnITubKoK4Tz+wJKgCCofCYxMg 1mTbTEteY+AnkcD7DfMBUWDHjgHM9OhSkIf156HGhzpy5GSFHOCckroJBqSj9yye pzZUiA7qXh4p6dzBI3EZcjS2vXAcwmvSQAXNu6F1TL2CjzLTfIzo+VZ8kxULoubg TjUtG7NOviXoSy54kRCkoPgqNDlg6yMTSl8dn1LGh9LtxW0B2r/24IlNoymZ1U/m tPY6SnDwa16dr3hPwYBpYkEfs11RUmXr88X9gAma1YzYMZXb3CpBvyXlqz8tCrbK sq/M6xIOiWyfFDMe1r4T5Hps2qTlrqr2UCAqj2Z0q5uLlr5IfCJZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdehgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttdertd dttddvnecuhfhrohhmpefirhgvghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqeen ucggtffrrghtthgvrhhnpeevueehjefgfffgiedvudekvdektdelleelgefhleejieeuge egveeuuddukedvteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 01:20:51 -0500 (EST) Date: Mon, 24 Jan 2022 07:20:45 +0100 From: Greg KH To: Paulo Miguel Almeida , kernelnewbies@kernelnewbies.org Subject: Re: ioctl number change / backwards compatibility doubt Message-ID: References: <20220117070125.GA17186@mail.google.com> <20220123075530.GB79751@mail.google.com> <20220124044906.GA8954@mail.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220124044906.GA8954@mail.google.com> X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org On Mon, Jan 24, 2022 at 05:49:06PM +1300, Paulo Miguel Almeida wrote: > On Sun, Jan 23, 2022 at 12:04:48PM +0100, Greg KH wrote: > > On Sun, Jan 23, 2022 at 08:55:30PM +1300, Paulo Miguel Almeida wrote: > > > > > > I googled a fair bit of time and I'm 99% confident that there isn't such > > > userspace/lib tool so I guess this will have done the hard way :( > > > > If there is no tool, why was the ioctl code written at all? Something > > had to call it. > > > > when you told me to look for the userspace tool that interfaced with the > ioctl, my interpretation was that you were referring to something akin > to what /usr/bin/uname utility is to the syscall uname. Please correct me > if I'm wrong. > > re: what calls the ioctl created by the driver. > > I'm led to believe that users of this driver make ioctl sycall > invocations directly from their application's source code like this: > > #include "pi433_if.h" /* userspace driver header */ > #include /* ioctl */ > > int file_desc = open("/dev/pi433.0", O_RDWR); > struct pi433_tx_cfg tx_cfg = { > .frequency = 433000000, > .bit_rate = 4800, > ... > }; > > int ret_val = ioctl(file_desc, PI433_IOC_WR_TX_CFG, tx_cfg); > .... Yes, sorry for the confusion, this is what I am referring to. Where is that userspace code as that is the code you will be needing to change if you want to change this ioctl interface. thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies