public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: TIOCGDEV
Date: 05 Oct 2002 17:19:20 +0200	[thread overview]
Message-ID: <m3elb4gbgn.fsf_-_@averell.firstfloor.org> (raw)
In-Reply-To: <1033824115.3425.2.camel@irongate.swansea.linux.org.uk>

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

(changed flamebait subject)

> On Sat, 2002-10-05 at 06:10, Andi Kleen wrote:
> > > * viro might have a cow at the use of kdev_t_to_nr...  is that required 
> > > for compatibility with some existing apps?  It seems like you want to 
> > > _decompose_ a number into major/minor, to be an interface that 
> > > withstands the test of time
> > 
> > It withstands the test of time as well as stat(2) or the loop ioctls.
> 
> Is that old stat, stat, stat64 or the proposed new stat64 ?

stat64 uses 64bit dev_t, but I have never heard anybody propose that
for the kernel too. This ioctl supports 32bit dev_t, which is where
all the current proposals go as far as I'm aware.

old stat and stat provide 16bit dev_t.

I cannot comment on the "proposed" one, because I haven't seen it.

If someone had a good case for the kernel ever implementing 64bit dev_t
then it would be of course possible to change the ioctl to copy 64bit
to the user space. So far this doesn't seem likely though.

> I see no good reason for this ioctl at all, in any tree.

Can you propose a different way to do the same thing then ? 

(again parsing /proc/cmdline doesn't work here) 

As background this is used for the "bootlogd" program that comes with sysvinit.
It is used to log all output that reaches /dev/console to a file
("console tee" basically). bootlogd intercepts the real console
for this using TIOCCONS, but to still output something it has to copy
the output to the original underlying device. Thus the ioctl - to find
this device.

The current bootlogd actually has some fallback code for the case
when the ioctl isn't there, but it's so incredibly ugly that I won't
try to describe it on a family list.

Thank you for your useful feedback.

-Andi

  reply	other threads:[~2002-10-05 15:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.NEB.4.44.0210041654570.11119-100000@mimas.fachschaften.tu-muenchen.de.suse.lists.linux.kernel>
2002-10-05  4:35 ` Why does x86_64 support a SuSE-specific ioctl? Andi Kleen
2002-10-05  5:04   ` Jeff Garzik
2002-10-05  5:10     ` Andi Kleen
2002-10-05 13:21       ` Alan Cox
2002-10-05 15:19         ` Andi Kleen [this message]
2002-10-05 17:00         ` Miquel van Smoorenburg
2002-10-09 18:03           ` Miquel van Smoorenburg
2002-10-05  7:56   ` H. Peter Anvin
2002-10-05 15:00     ` Andi Kleen
2002-10-07 17:48       ` Marcelo Tosatti
2002-10-05 13:20   ` Alan Cox
2002-10-05 14:36     ` Andrea Arcangeli

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=m3elb4gbgn.fsf_-_@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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