Subject: Re: COMPAT_LINUX and errno: one more dead bug!
To: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
From: Jaromír Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 02/09/2001 01:38:56
Emmanuel Dreyfus wrote:
> Just one problem: I had to #define COMPAT_LINUX in
> powerpc/powerpc/trap.c, it was not defined while compiling. I need to
> fix this before comitting. Do you see any reason why COMPAT_LINUX would
> not be defined in trap.c

Note that COMPAT_LINUX is defopted, so you should

#include "opt_compat_linux.h"

in powerpc/powerpc/trap.c to get the define (config(8) creates the
file in kernel compile directory). COMPAT_LINUX should NOT be defined
in trap.c.

Some additional work should be done to make this LKMable on powerpc
(since I'm not aware how the syscall code works on powerpc, I can't
help here), but you don't need to worry about that right now
probably. Having the Linux emulation loadable as LKM would surely
help you with debugging, though :)

You also need to make sure that the errno is only remapped for
binaries running under Linux emulation of course, but you probably know this :)
You also need to make sure that NO Linux emulation bits would be
there if COMPAT_LINUX is not defined.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, dammit!  @@@@