From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 16:44:30 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 EE4BD16A4CE for ; Thu, 26 Aug 2004 16:44:30 +0000 (GMT) Received: from smtp-out2.email.it (smtp-out2.email.it [80.247.70.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EAF943D45 for ; Thu, 26 Aug 2004 16:44:30 +0000 (GMT) (envelope-from mmaist@email.it) Received: from 213.140.6.102 (unknown [80.247.70.13]) by smtp-out2.email.it (Email.it) with ESMTP id BDE201BC67E for ; Thu, 26 Aug 2004 18:44:34 +0200 (CEST) Received: from Email-mailer ([213.140.6.102]) by 213.140.6.102 with HTTP (Wmail); Thu, 26 Aug 2004 18:44:34 +0200 Date: Thu, 26 Aug 2004 18:44:34 +0200 To: freebsd-hackers@freebsd.org From: Mmaist Message-ID: X-Priority: X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 213.140.6.102 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 27 Aug 2004 12:07:13 +0000 Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: syscalls implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mmaist 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 16:44:31 -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 You didn\'t point the problem. kldload(2) accepts just one const char* and the only one implementation I\'ve found of kldload(2) is int kldload(struct thread *, struct kldload_args *), so I guess there could be kldload(const char*) implementation in another file; where is? thanks in advance markus -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Incredibile offerta: 18 eccellenti vini Giordano + 7 gustose specialità alimentari compreso un carrello dispensa o una batteria di pentole. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2619&d=20040826