Re: syscalls implementation

2004-08-27 Thread Mmaist
> You could overwrite sysent[SYS_kldload] to point to your own kldload > function. After you do what you want to, you return what the original > kldload returns. Meaning, call the original kldload and return it\'s value. > > int (*orig_kldload)(struct thread *, struct kldload_args *) = > sysent[SY

Re: syscalls implementation

2004-08-27 Thread Terry Lambert
Mmaist wrote: > Hi! > I was wondering were syscalls implementation is in the FreeBSD source tree. > I would like to know, especially, where > > int kldload(const char*); > > is located. sys/kern/kern_linker.c contains > > int > kldload(struct thread *, struct kldload_args *) > > and I need to w

Re: syscalls implementation

2004-08-26 Thread Shawn Webb
You could overwrite sysent[SYS_kldload] to point to your own kldload function. After you do what you want to, you return what the original kldload returns. Meaning, call the original kldload and return it's value. int (*orig_kldload)(struct thread *, struct kldload_args *) = sysent[SYS_kldload]; i