Re: [PATCH] rumpuser__errtrans_rump2host()

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Thu, 13 Aug 2015 20:04:36 +0000

On 13/08/15 19:38, Robert Millan wrote:

If you want to pass the errno around to some code which does not
understand rump kernels, it's up to your application to translate the
values before passing them on.

The problem here is that I'd be basically implementing
rumpuser__errtrans_rump2host(). A bit
worse than that, because my code would easily get out of sync if/when
NetBSD adds new errnos.

I don't see the problem. There haven't been new errnos in over 9 years, and if your application happens to return EINVAL for some hypothetical new errno, I doubt things will fail catastrophically.

Since other host code using rump could easily need the same thing, why
not just put this in
librumpuser like its rumpuser__errtrans() counterpart? Would make life
easier for everyone
in this situation IMHO.

No. The hypercall library is completely the wrong place for functionality which is never needed by the rump kernel. It's not a dump for random useful routines.

If you think it's a huge benefit for you, we can add your code as an inline function to <rump/rumperr.h>. But it will still go out-of-date unless the header is somehow autogenerated as part of the build.

Other related posts: