I wish to have a customized device to echo a specific value like /dev/zero
or /dev/random
. But /dev/zero
always outputs 0, /dev/random
outputs a random number.
The specific value may be configured, for example --- 0x1234, 0x4321, 0xF6, or some ASCII streams Yes
and No
.
How do I create such a device?