From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 15:56:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CBE116A4CE for ; Thu, 26 Aug 2004 15:56:32 +0000 (GMT) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id E3B6C43D5E for ; Thu, 26 Aug 2004 15:56:31 +0000 (GMT) (envelope-from shawnwebb@softhome.net) Received: (qmail 11061 invoked by uid 417); 26 Aug 2004 15:56:31 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 26 Aug 2004 15:56:31 -0000 Received: from m00 ([24.10.159.210]) (AUTH: LOGIN shawnwebb@softhome.net) by softhome.net with esmtp; Thu, 26 Aug 2004 09:56:31 -0600 Message-ID: <000801c48b85$36f73b60$0c0aa8c0@Domain> From: "Shawn Webb" To: "Mmaist" References: Date: Thu, 26 Aug 2004 09:56:10 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 cc: freebsd-hackers@freebsd.org Subject: Re: syscalls implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 15:56:32 -0000 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" To: 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