Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2002 11:10:15 +0100
From:      =?ISO-8859-2?Q?Pawe=B3_Jakub_Dawidek?= <nick@garage.freebsd.pl>
To:        freebsd-hackers@freebsd.org
Subject:   Re: File name.
Message-ID:  <20020204111015.D45984@garage.freebsd.pl>

next in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020204111015.D45984>