From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751441AbXDZXlR (ORCPT ); Thu, 26 Apr 2007 19:41:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755244AbXDZXlR (ORCPT ); Thu, 26 Apr 2007 19:41:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47684 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbXDZXlQ (ORCPT ); Thu, 26 Apr 2007 19:41:16 -0400 To: Paul Fulghum Cc: Linux Kernel Mailing List Subject: Re: compat_ioctl question References: <1177620717.5060.11.camel@amdx2.microgate.com> From: Andi Kleen Date: 27 Apr 2007 02:38:56 +0200 In-Reply-To: <1177620717.5060.11.camel@amdx2.microgate.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Paul Fulghum writes: > > 1. define compat_ioctl() file operation for device and > implement translation code in individual driver > 2. add COMPATIBLE_IOCTL entry to include/linux/compat_ioctl.h > to mark an ioctl code as the same in any environment > 3. add HANDLE_IOCTL entry to fs/compat_ioctl.c with translation code > implemented in the same file > > There is no way to implement #1 for a tty driver without > modifying the kernel tty code to allow registration of a > compat_ioctl() handler. (1) is really the recommended solution for all new code I would recommend you modify the tty driver to pass compat_ioctl through through. Should not do very hard. -Andi