From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 15 May 2001 18:50:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 15 May 2001 18:50:18 -0400 Received: from [206.14.214.140] ([206.14.214.140]:4872 "EHLO www.transvirtual.com") by vger.kernel.org with ESMTP id ; Tue, 15 May 2001 18:50:04 -0400 Date: Tue, 15 May 2001 15:49:31 -0700 (PDT) From: James Simmons To: Chip Salzenberg cc: Alan Cox , Linus Torvalds , Neil Brown , Jeff Garzik , "H. Peter Anvin" , Linux Kernel Mailing List , viro@math.psu.edu Subject: Re: LANANA: To Pending Device Number Registrants In-Reply-To: <20010515144020.H3098@valinux.com> Message-ID: 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 > According to Alan Cox: > > Given a file handle 'X' how do I find out what ioctl groups I should > > apply to it. > > Wouldn't it be better just to *try* ioctls and see which ones work and > which ones don't? You can do this with the tty layer. Just open /dev/tty and try tioclinux. On my serial console it fails and when I run the exact same program works on my VT. It is the only way to see if these ioctl calls work. No other way to see if your on a serial console or a VT.