Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932698AbcCMKfw (ORCPT ); Sun, 13 Mar 2016 06:35:52 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:33312 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932549AbcCMKfq (ORCPT ); Sun, 13 Mar 2016 06:35:46 -0400 Date: Sun, 13 Mar 2016 13:35:23 +0300 From: Cyrill Gorcunov To: Jiri Slaby Cc: LKML , Peter Hurley , Greg Kroah-Hartman , Andrey Vagin , Konstantin Khorenko , Vladimir Davydov , Pavel Emelianov Subject: Re: [RFC] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data Message-ID: <20160313103523.GP1989@uranus.lan> References: <20160312141830.GM1989@uranus.lan> <56E53D96.3010107@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56E53D96.3010107@suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 801 Lines: 17 On Sun, Mar 13, 2016 at 11:14:46AM +0100, Jiri Slaby wrote: > On 03/12/2016, 03:18 PM, Cyrill Gorcunov wrote: > > --- linux-ml.git.orig/include/uapi/asm-generic/ioctls.h > > +++ linux-ml.git/include/uapi/asm-generic/ioctls.h > > @@ -77,6 +77,7 @@ > > #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ > > #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ > > #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ > > +#define TIOCPEEKRAW _IOR('T', 0x41, void *) > > Hi, this is not 32/64bit compatible and would need a compat ioctl number > and a wrapper. Since it is char *, could you make it just 'char'? Hi Jiri, sure, thanks! Lets wait for more feedback, maybe there some other more elegant solution possible, which I failed to invent. Cyrill