From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755634Ab0KPRQG (ORCPT ); Tue, 16 Nov 2010 12:16:06 -0500 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:36449 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752978Ab0KPRQF (ORCPT ); Tue, 16 Nov 2010 12:16:05 -0500 Date: Tue, 16 Nov 2010 17:14:47 +0000 From: Alan Cox To: Kay Sievers Cc: linux-kernel , Greg KH , Lennart Poettering , Werner Fink , Jiri Slaby Subject: Re: tty: add 'active' sysfs attribute to tty0 and console device Message-ID: <20101116171447.29336514@lxorguk.ukuu.org.uk> In-Reply-To: References: <1289922400.1253.3.camel@yio.site> <20101116155717.6671e484@lxorguk.ukuu.org.uk> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > NAK this, its a nonsense interface > > > > Seriously what use is an interface that tells you "what the console might > > have been", this is why we have a proper event tracking interface instead. > > You mean the VT_WAITEVENT? Sleeping ioctls() can't be used. The time > between the check for the current, and you go to sleep in the ioctl() > for teh next is a window which isn't covered with such interface. The only thing you need to add is VT_GETACTIVE, which is fine providing you know how to use it, but in both cases it is basically useless because by the time you've asked the question the answer is undefined. You can only use an interface of this type if you lock against VT changes, which is how the X interface works if you look at it. So what are you going to do with the return value from an interface which provide "what was the console, perhaps, at some point you asked but could even have been deleted, assigned to a different user, hot unplugged or moved to another framebuffer device by the time I answer" What is it for ???