Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Apr 2015 14:57:29 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom
Message-ID:  <20150401115729.GA64665@FreeBSD.org>
In-Reply-To: <20150401115204.GB16649@dft-labs.eu>
References:  <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150401115729.GA64665>