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]; int my_kldload(struct thread *, struct kldload_args *); int my_kldload(struct thread *td, struct kldload_args *uap) { do_stuff_here(); return (*orig_kldload)(td, uap); } lattera ----- Original Message ----- From: "Mmaist" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 25, 2004 7:30 AM Subject: syscalls implementation > 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 watch at what called between them. > > thanks, > > markus > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Cepu offre una soluzione di insegnamento individuale e personalizzato > tutor specializzati e assistenza nel disbrigo delle pratiche burocratiche > > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2611&d=20040825 > > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.737 / Virus Database: 491 - Release Date: 8/11/04 _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"