[lkml]   [2011]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/1] Implement /dev/byte (a generic byte source similiar to /dev/zero)
    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
    (cesky, pictures)

     \ /
      Last update: 2011-04-20 15:45    [W:0.020 / U:3.004 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site