Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 09:53:23 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        "Walter C. Pelissero" <walter@pelissero.org>
Cc:        emulation@FreeBSD.ORG
Subject:   Re: SVR4 missing syscall
Message-ID:  <20001121095323.A23358@dan.emsphone.com>
In-Reply-To: <20001121094313.A1118@dan.emsphone.com>; from "Dan Nelson" on Tue Nov 21 09:43:13 GMT 2000
References:  <14873.23011.159826.718978@hyde.lpds.sublink.org> <20001120130301.A10520@dan.emsphone.com> <14874.23121.801503.448167@hyde.lpds.sublink.org> <20001121094313.A1118@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 21), Dan Nelson said:
> In the last episode (Nov 21), Walter C. Pelissero said:
> > Dan Nelson writes:
> > > In the last episode (Nov 20), Walter C. Pelissero said:
> > > > Which call is it about?  I see an "old.lstat" but I couldn't
> > > > find any reference in the kernel source tree.  Is there any doc
> > > > I could read to see if I can hack this syscall in the emulator?
> > > 
> > > old.lstat is syscall #40, which is the ibcs2_xenix syscall on SCO.
> > 
> > May I ask you where you got this information from?  I was grep-ing
> > around in the kernel source tree but I couldn't figure out that
> > this old.lstat is syscall #40, let alone that it was a Xenix
> > syscall.
> 
> Take a look at /sys/kern/syscalls.master.  Any syscall with the word
> "old" in it has been phased out and gets a COMPAT flag.  So you would
> look for a "COMPAT ... lstat" line, which happens to be #40.

Oops; I only half-finished the explanation.  Now that you know it's
syscall #40, you then have to look up syscall #40 in
/sys/compat/svr4/syscalls.master .  It reads "40 UNIMPL SVR4 xenix".
Your next step is to check the iBCS2 code to see if IT has implemented
syscall 40.  /sys/i386/ibcs2/syscalls.master lists syscall 40 as 

40 STD SCO { int ibcs2_xenix(int a1, int a2, int a3, int a4, int a5); }

Bingo.  Copy that line over to the svr4 syscalls.master file, tweak
some other files to make the ibcs2_xenix function visible to the svr4
module, make svr4 depend on ibcs2, and you're done.

With that syscall. 

Now run your program again, and figure out what makes it crash now :).

-- 
	Dan Nelson
	dnelson@emsphone.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001121095323.A23358>