Date: Wed, 28 Aug 2002 20:30:18 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Replacing kernel functions. Message-ID: <20020828183018.GL31943@garage.freebsd.pl> In-Reply-To: <3D6CBC0B.A94B7197@mindspring.com> References: <20020828021016.GB31943@garage.freebsd.pl> <3D6C3F16.EC09BDB@mindspring.com> <20020828102902.GF31943@garage.freebsd.pl> <3D6CBC0B.A94B7197@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--nrM5Z5VIJgwP9LWp Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2002 at 05:03:23AM -0700, Terry Lambert wrote: +> -- Terry Thanks to Your help I've found maybe better way to do this. I could catch open(), and: int myopen(struct proc *p, struct open_args *uap) { int ret; if ((ret =3D open(p, uap)) !=3D 0) return (ret); /* * And here I can cache uap->name and change close() function address, * where address of those functions is here: * p->p_fd->fd_ofiles[p->p_retval[0]]->f_ops->fo_close */ return (0); } This is much more complicated, because if I will change address of this function, it changes for every descriptor on this file system. So I need cache original address of fo_close() functions, etc. But this should works, I'm testing it at the moment. --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --nrM5Z5VIJgwP9LWp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPW0Wuj/PhmMH/Mf1AQF9xAQAjTNv/q8rrUBZeaBXsBTZxlXEJZsNMmXV tOQd5hQFJ8VAEC4VZn6wC9RGuatR9rHvxrNEGqeSxEfT5tFWZsjjmNGiea4rTm+x spxT1lHj8aobTx4BCUZLoj5D2yUUKaLAHWHeaV/UAeWlJoucEMRZzttKCnyS/FlS aABRIhFYq8s= =VgJT -----END PGP SIGNATURE----- --nrM5Z5VIJgwP9LWp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020828183018.GL31943>