Subject: Re: Need help with creating system calls
To: Ferry Sutanto <fsutanto@yahoo.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 02/13/2001 21:23:29
On Mon, Feb 12, 2001 at 12:36:43PM -0800, Ferry Sutanto wrote:
> Hi Chris,
>
> Thanks for the information. I apreciated it.
>
> Here is what I have done.
>
> - add a new entry to usr/src/sys/kern/syscalls.master
>
> - run sh ./makesyscalls.sh syscalls.conf
> syscalls.master
>
> - define my syscalls, sys_foo, in
> usr/src/sys/foo/foo.c
>
> - In order to build the kernel with sys_foo, I need to
> modify this file (the depend list?)
>
> usr/src/sys/arch/myNetBSD/conf/files.myNetBSD
If your syscall is machine-idependant (work on something else than myNetBSD),
better add it to sys/conf/files
> - Create a C interface function foo() in
> usr/src/lib/libc/gen/gethostname.c. I borrow this
> file. Do you know where I should put it ?
Put a foo.c in libc/gen (for example) and add foo.c in
lib/libc/gen/Makefile.inc
--
Manuel Bouyer <bouyer@antioche.eu.org>
--