[Drbd-dev] avoid use of errno as a function parameter name
Robert Altnoeder
robert.altnoeder at linbit.com
Fri Jun 14 11:49:39 CEST 2019
On 6/12/19 4:11 PM, Lars Ellenberg wrote:
> On Wed, Jun 05, 2019 at 10:14:19AM -0600, David Butterfield wrote:
>> Avoid use of errno as an argument name because it is allowed to be a macro such as
>> # define errno (*__errno_location ())
> You do realize that we are kernel code...
I guess that's a request related to his fork of DRBD which was modified
to run in user mode.
@David:
Only changing errno to _errno to fix this is probaby not the best idea,
so if we're going to change this, then I'd rather use a new variable
name that does not even suggest being related to errno, otherwise
whoever sees it the next time might be tempted to change it back to errno.
While I'm at it, I am wondering a bit about the modification of DRBD to
run in usermode. It's not that I couldn't see a whole lot of reasons why
you'd want to do this, quite the opposite, but I believe it would make a
lot more sense if you did that on top of a true microkernel OS such as
e.g. Minix, seL4, Integrity or QNX. That might even turn the whole thing
into a very useful project, as such a port of DRBD might be interesting
for use in e.g. embedded systems running those OSs.
Cheers,
Robert
More information about the drbd-dev
mailing list