From: Alexander Holler <holler@ahsoftware.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mike Frysinger <vapier.adi@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] Implement /dev/byte (a generic byte source similiar to /dev/zero)
Date: Tue, 19 Apr 2011 11:05:10 +0200 [thread overview]
Message-ID: <4DAD5046.3030008@ahsoftware.de> (raw)
In-Reply-To: <20110419094436.0b667410@lxorguk.ukuu.org.uk>
Hello,
Am 19.04.2011 10:44, schrieb Alan Cox:
>> As for /dev/zero there are many other possible reasons to use such a
>> device, besides filling something with a value. For me it's as
>> reasonable as dev/zero, just that it offers a bit more flexibility and
>> provides another, at least for me useful, default value. Maybe
>> /dev/nzero would have been a good name too. ;)
>
> /dev/zero exists not to put \0's into files as such but because it is
> very useful to be able to map the zero page (a read only, or
> copy-on-write blank page) into programs. The mmap is the reason it is
> there.
Thanks for the explanation.
>> But I don't really care about inclusion into the kernel, it's just
>> something I had lying around (and needed only marginally work to
>> finalize as a proper patch) and I thought someone else could find it
>> usefull and I should share that here.
>
> Implementationwise I think I would have gone for allocating a new device
> and range of 256 minors - that would avoid the funky stuff setting what
> it fills with as you'd just fill with the minor number.
I thought about that too, but that would have been to easy (and static). ;)
And the usage of file descriptors was the only idea I've come up with,
which is multitasking and multiuser aware.
Regards,
Alexander
next prev parent reply other threads:[~2011-04-19 9:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 11:37 [PATCH 0/1] Implement /dev/byte (a generic byte source similiar to /dev/zero) Alexander Holler
2011-04-18 11:37 ` [PATCH 1/1] " Alexander Holler
2011-04-20 10:57 ` Pavel Machek
2011-04-20 18:07 ` Alexander Holler
2011-04-18 13:57 ` [PATCH 0/1] " Mike Frysinger
2011-04-19 8:34 ` Alexander Holler
2011-04-19 8:44 ` Alan Cox
2011-04-19 9:05 ` Alexander Holler [this message]
2011-04-19 9:32 ` Alexander Holler
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=4DAD5046.3030008@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier.adi@gmail.com \
/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