Hi Antti,

El 13/08/15 a les 11:55, Antti Kantee ha escrit:
In summary, how would I go about writing portable host code which uses
rump_sys_open() and
its friends, while fixing the returned errno?

Without syscall emulation active, rump_sys_* return RUMP_E* errnos.  The fact that they 
match on NetBSD is a "coincidence".
> So, check against those.

Well, can't do that :-). My code is part of a library, it doesn't check the 
errnos at all, just passes
them along to the upper layer.

But I get that you already have this situation in mind:

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.

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.

--
Robert Millan

Reply via email to