Re: [PATCH] rumpuser__errtrans_rump2host()

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Sun, 16 Aug 2015 11:20:30 +0000

On 16/08/15 00:55, Robert Millan wrote:

Uhm yes, I think it could be useful to me. However based on your replies I
suspect I may be doing
something strange, or at least unusual.

Ok send a patch for that.

Notice how the rump_errtrans_rump2host() function in this code is being quite
useful. Also note
the replacement of O_NDELAY and O_CLOEXEC by hardcoded numbers, where a similar
translation facility
would be useful too.

Available in <rump/rumpdefs.h>

Am I doing something completely wrong here? Does this look like the right way
of using
rump_sys_{open,ioctl,etc}?

You might want to not replace each call site explicitly, but rather with an indirection. Look at how prog_ops works in various NetBSD utilities (e.g. ifconfig).

Other related posts: