From: Pavel Machek <pavel@ucw.cz>
To: Alexander Holler <holler@ahsoftware.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Implement /dev/byte (a generic byte source similiar to /dev/zero)
Date: Wed, 20 Apr 2011 12:57:55 +0200 [thread overview]
Message-ID: <20110420105754.GA14722@ucw.cz> (raw)
In-Reply-To: <1303126676-3456-2-git-send-email-holler@ahsoftware.de>
On Mon 2011-04-18 13:37:56, Alexander Holler wrote:
> This device outputs by default 0xff instead 0 which makes more sense
> than 0 to clear e.g. FLASH based devices.
Well, now you should provide example where you mmap /dev/byte, then
write() the flash directly from the mapping.
... hmm, that brings good question: what happens on existing mappings
when the byte is changed?
> To make the device more general usable, the value it outputs is changeable
> on a per file descriptor basis through simple writes to it.
> Values can be decimal (0 - 255), octal (00 - 0377) or hex (0x0 - 0xff).
> For other values (or strings) written to it, the write operation returns an
> error and the subsequent output is undefined.
...
> # Create a file of size 10GB and filled with 0xaa.
> exec 5<>/dev/byte # Open /dev/byte and assign fd 5 to it
> echo 0xaa >&5 # Instruct the device to output 0xaa
That's seriously strange. /dev/byte should be changeable... by writing
bytes.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2011-04-20 13:43 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 [this message]
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
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=20110420105754.GA14722@ucw.cz \
--to=pavel@ucw.cz \
--cc=holler@ahsoftware.de \
--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