Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 1998 23:12:56 -0700
From:      "Eric A. Davis" <edavis@nas.nasa.gov>
To:        freebsd-hackers@FreeBSD.ORG
Cc:        edavis@shark.nas.nasa.gov
Subject:   still having problems adding system calls...
Message-ID:  <199804150612.XAA20359@shark.nas.nasa.gov>

next in thread | raw e-mail | index | archive | help

I am still having problems adding some system calls to 2.2.5.  Here is
what I have done:

1. added the needed definitions to sys/kern/syscalls.master

	#ifdef FMON
	326     STD     BSD     { int fmon_open(void); }
	327     STD     BSD     { int fmon_close(int fd); }
	328     STD     BSD     { int fmon_monitor_file(char *path); }
	329     STD     BSD     { int fmon_monitor_dir(char *path); }
	330     STD     BSD     { int fmon_cancel_monitor(char *path); }
	#else
	326     UNIMPL  BSD     nosys
	327     UNIMPL  BSD     nosys
	328     UNIMPL  BSD     nosys
	329     UNIMPL  BSD     nosys
	330     UNIMPL  BSD     nosys
	#endif

   the above system calls are located in there own file in sys/kern
   
2. executed sys/kern/makesyscalls.sh

3. compiled a new kernel and put in / (the kernel compiles cleanly)

4. copied sys/sys/syscall.h to /usr/include/sys/syscall.h
          sys/sys/syscall-hide.h to /usr/include/sys/syscall-hide.h
          sys/sys/sysproto.h to /usr/include/sys/sysproto.h

5. edited /usr/src/lib/libc/sys/Makefile.inc to include the above defs
   added the above defs to the end of the ASM define in Makefile.inc
   (i.e fmon_open.o fmon_close.o ...)

6. did a make obj, depend, all, and install in /usr/src/lib/libc
   doing a strings on the new libc shows the symbols for the new calls

7. rebooted


Now when I try to use any of the system calls my application will
compile cleany but when run will core dump with a mesage saying bad
system call message.  Any ideas?  Is there someplace where I can find
documentation for the above procedures?

Thanks,
- e

--
     Eric Allen Davis        Network Engineer
     edavis@nas.nasa.gov     NASA Ames Research Center 
     Voice: (415)604-2543    NAS Systems Division
     Pager: (415)428-6931    http://www.nas.nasa.gov/~edavis

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



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