All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] alternative API for raw devices
Date: 1 May 2002 15:52:25 -0700	[thread overview]
Message-ID: <aaprj9$nqv$1@cesium.transmeta.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0205011555450.12640-100000@weyl.math.psu.edu>

Followup to:  <Pine.GSO.4.21.0205011555450.12640-100000@weyl.math.psu.edu>
By author:    Alexander Viro <viro@math.psu.edu>
In newsgroup: linux.dev.kernel
> 
> 	* it's _not_ a character device - stat() will give you S_IFREG.
> 	  To check that <foo> is a new-style raw device call statfs(2) and
> 	  compare .f_type with rawfs magic (0x726177).  It doesn't conflict
> 	  with existing check for raw devices (stat(), check that it's
> 	  a character device and compare major with RAW_MAJOR), so existing
> 	  software can be taught to check for raw devices in
> 	  backwards-compatible way.
> 

I really don't know if it's a good idea for this to be S_IFREG, which
software has a reasonable expecation to behave like a normal file,
which a raw device *definitely* doesn't.

I would really like things like this as well as a lot of the
zero-length magic files in /proc to be S_ISCHR with i_rdev ==
MK_DEV(0,0) (the latter to let user space know that this isn't a
standard device node.)

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  parent reply	other threads:[~2002-05-01 22:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-01 20:12 [PATCH] alternative API for raw devices Alexander Viro
2002-05-01 21:01 ` Jeff Garzik
2002-05-01 21:44   ` Alexander Viro
2002-05-01 22:52 ` H. Peter Anvin [this message]
2002-05-04 22:24 ` Pavel Machek

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='aaprj9$nqv$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.