Re: tty: add 'active' sysfs attribute to tty0 and console device
From: Dr. Werner Fink
Date: Fri Dec 03 2010 - 06:48:33 EST
On Wed, Dec 01, 2010 at 11:37:49AM -0600, Milton Miller wrote:
> On Wed, 01 Dec 2010 about 12:32:22 -0000, Werner Fink wrote:
> >
> > Just have dug out this one:
>
> One question and two minor nits.
>
> >
> > On Fri, Nov 19, 2010 at 06:07:36PM +0100, Werner Fink wrote:
> > > On Fri, Nov 19, 2010 at 03:47:05PM +0000, Alan Cox wrote:
> > > > > Currently the bootlogd(8) or blogd(8) parse the kernels command line
> > > > > and if available do an ioctl TIOCGDEV (not supported by the upstream
> > > > > kernel), then create a pty/tty pair, do an ioctl TIOCCONS to forward
> > > >
> > > > So perhaps the vendors using TIOCGDEV could get off their collective
> > > > backsides and submit it upstream ?
> > >
> > > That I've tried 10 years before. If you think it's worth to retry
> > > you may have a look on the attachment only for a short review
> >
> >
> > Werner
> >
> >
> > >From 3ed084a05b7d28d65f6cc42c96696c7cb49c84a1 Mon Sep 17 00:00:00 2001
> > In-Reply-To: <20101119154705.7829487a@xxxxxxxxxxxxxxxxxxx>
> > References: <20101119154705.7829487a@xxxxxxxxxxxxxxxxxxx>
> > From: Werner Fink <werner@xxxxxxx>
> > Date: Fri, 19 Nov 2010 17:54:44 +0100
> > Subject: [PATCH] Add tty ioctl to figure device node of the system console.
> >
>
> Please put a changelog here as per "15) The canonical patch format"
> in Documentation/SubmittingPatches.
>
> >
> > Signed-off-by: Werner Fink <werner@xxxxxxx>
> >
> > diff --git a/arch/alpha/include/asm/ioctls.h b/arch/alpha/include/asm/ioctls.h
> > index 59617c3..034b6cf 100644
> > --- a/arch/alpha/include/asm/ioctls.h
> > +++ b/arch/alpha/include/asm/ioctls.h
> > @@ -92,6 +92,7 @@
> > #define TIOCGSID 0x5429 /* Return the session ID of FD */
> > #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
> > #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
> > +#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
> > #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
> >
> > #define TIOCSERCONFIG 0x5453
> > diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/asm/ioctls.h
> > index 4e06144..0a10575 100644
> > --- a/arch/parisc/include/asm/ioctls.h
> > +++ b/arch/parisc/include/asm/ioctls.h
> > @@ -52,6 +52,7 @@
> > #define TCSETSF2 _IOW('T',0x2D, struct termios2)
> > #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
> > #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
> > +#define TIOCGDEV _IOW('T',0x32, int) /* Get primary device node of /dev/console */
>
> All of the other architetures add this as _IOR but here in parisc
> it is _IOW. Was this intentional or a typo?
Thansk for spotting.
Werner
--
System V style init programs - http://savannah.nongnu.org/projects/sysvinit/