linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel van Smoorenburg <miquels@cistron.nl>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Kurt Garloff <garloff@suse.de>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux kernel list <linux-kernel@vger.kernel.org>
Subject: Re: TIOCGDEV ioctl
Date: Sat, 16 Dec 2000 11:46:45 +0100	[thread overview]
Message-ID: <20001216114645.A8944@cistron.nl> (raw)
In-Reply-To: <Pine.LNX.4.10.10012151710040.1325-100000@penguin.transmeta.com> <Pine.GSO.4.21.0012152038560.13037-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0012152038560.13037-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Fri, Dec 15, 2000 at 08:54:01PM -0500

According to Alexander Viro:
> On Fri, 15 Dec 2000, Linus Torvalds wrote:
> 
> > Please instead do the same thing /dev/tty does, namely a sane interface
> > that shows it as a symlink in /proc (or even in /dev)
> 
> There you go... (/proc/tty/console -> /dev/tty<current_VC>; may very well

The current VT (fg_console) and /dev/console are 2 different things ...
/dev/console might be /dev/ttyS1. Besides to get at fg_console
we already have ioctl(/dev/tty0, TIOCLINUX, 12)

There is currently no way to find out with what device /dev/console
is associated.

Why is that needed? For example, I wrote a program 'bootlogd' that opens
/dev/console and a pty pair, uses TIOCCONS to redirect console
messages to the pty pair so they can be logged. However one would
like to write those messages to the _actual_ console as well, but
there is no way to find out what the real console is.

For this application a ioctl is better than a /proc symlink since
it would be started before /proc is even mounted.

Mike.
-- 
RAND USR 16514
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-16 11:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-16  0:55 TIOCGDEV ioctl Kurt Garloff
2000-12-16  1:11 ` Linus Torvalds
2000-12-16  1:54   ` Alexander Viro
2000-12-16 10:46     ` Miquel van Smoorenburg [this message]
2000-12-16 11:15       ` Alexander Viro
2000-12-16 11:40         ` Miquel van Smoorenburg
2000-12-16 11:57           ` Alexander Viro
2000-12-19 11:34             ` Kurt Garloff
2000-12-21 14:22   ` Dr. Werner Fink
2000-12-16  1:18 ` James Simmons
2000-12-16 10:54   ` Miquel van Smoorenburg
2000-12-18 17:07     ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001216114645.A8944@cistron.nl \
    --to=miquels@cistron.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=garloff@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).