svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

Gleb Smirnoff glebius at FreeBSD.org
Wed Apr 1 11:57:32 UTC 2015


On Wed, Apr 01, 2015 at 01:52:04PM +0200, Mateusz Guzik wrote:
M> /dev/zero returns 0s, while notrandom was implemented to return 7s.
M> 
M> We could e.g. symlink /dev/notrandom to /dev/zero, but that would break
M> compatiblity with Solaris apps depending on this functionality.
M> 
M> It could also introduce hard-to-debug problems. After all, readers get a
M> different value than they expect.
M> 
M> Given that we have some parts of Solaris merged (zfs, dtrace) and work
M> with open source forks on these technologies, I think we should diverge
M> only when necessary.
M> 
M> As a side note I'm surprised with the choice of 7.
M> 
M> I would expect 3, no more, no less. 3 would be the number returned, and
M> the number readers receive would be 3.

You can add the seven_region variable to dev/null/null.c and implement
the new device here. Now notrandom.c shares > 50% of code with null.c.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list