[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110419094436.0b667410@lxorguk.ukuu.org.uk>
Date: Tue, 19 Apr 2011 09:44:36 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Alexander Holler <holler@...oftware.de>
Cc: Mike Frysinger <vapier.adi@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/1] Implement /dev/byte (a generic byte source similiar
to /dev/zero)
> 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.
> 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.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists