From owner-freebsd-hackers Mon Feb 4 2: 9:47 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from milla.33net.fdns.net (milla.33net.fdns.net [217.197.166.58]) by hub.freebsd.org (Postfix) with ESMTP id 4398237B400 for ; Mon, 4 Feb 2002 02:09:40 -0800 (PST) Received: (from nick@localhost) by milla.33net.fdns.net (8.11.6/8.11.6) id g14AAFt46841 for freebsd-hackers@freebsd.org; Mon, 4 Feb 2002 11:10:15 +0100 (CET) (envelope-from nick) Date: Mon, 4 Feb 2002 11:10:15 +0100 From: =?ISO-8859-2?Q?Pawe=B3_Jakub_Dawidek?= To: freebsd-hackers@freebsd.org Subject: Re: File name. Message-ID: <20020204111015.D45984@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="hxkXGo8AKqTJ+9QI" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-PGP-Key-URL: http://garage.freebsd.pl/keys/PGP.txt X-OS: FreeBSD 4.5-RC i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --hxkXGo8AKqTJ+9QI Content-Type: text/plain; charset=ISO-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 04, 2002 at 01:27:39AM -0800, Terry Lambert wrote: +> char *saved_name; +>=20 +> func() +> { +> char *foo; +>=20 +> ... +>=20 +> fd =3D open( foo, O_RDWR, 0664); +> saved_name =3D strdup( foo); +>=20 +> ... +>=20 +> printf( "name that goes with fd %d is '%s'\n", +> fd, saved_name); +> ... +> } +>=20 +> i.e.: You opened the thing, you ought to know its name.=20 +>=20 Nope. We are in kernel area. I want to control for example open() syscall: static int my_open(register struct proc *p, register struct open_args *ea) { [...] } Name of file to open is in ea->path, but this name can be: ./somefile and i need a full path to it. --=20 Pawe=B3 Jakub Dawidek Network Administrator. Am I Evil? Yes, I Am. --hxkXGo8AKqTJ+9QI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia iQCVAwUBPF5eBz/PhmMH/Mf1AQFSEQP+Ir/rGLnVKuDUow27z4A6gGNBksGFFzFb 6wSB4rO8jDYjihIYlHBFsSXGE8Wn05zpfdmb3k4v8oIz+ERFul31S+4whCHEfGJF ZJacRyGS08IQ6WyBqfL99Wfxs39SbfNS5ckWvgvVCVqdiSNpj7SzoYxAUSfL57o5 7fNCgmiQtao= =COd3 -----END PGP SIGNATURE----- --hxkXGo8AKqTJ+9QI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message