Date: Thu, 26 Aug 2004 09:56:10 -0600 From: "Shawn Webb" <shawnwebb@softhome.net> To: "Mmaist" <mmaist@email.it> Cc: freebsd-hackers@freebsd.org Subject: Re: syscalls implementation Message-ID: <000801c48b85$36f73b60$0c0aa8c0@Domain> References: <fb356c20f5bbebc5f8888312d44f11b5@213.203.147.246>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <mmaist@email.it> To: <freebsd-hackers@freebsd.org> 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 > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000801c48b85$36f73b60$0c0aa8c0>