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
[-- Attachment #1 --]
On Mon, Feb 04, 2002 at 01:27:39AM -0800, Terry Lambert wrote:
+> char *saved_name;
+>
+> func()
+> {
+> char *foo;
+>
+> ...
+>
+> fd = open( foo, O_RDWR, 0664);
+> saved_name = strdup( foo);
+>
+> ...
+>
+> printf( "name that goes with fd %d is '%s'\n",
+> fd, saved_name);
+> ...
+> }
+>
+> i.e.: You opened the thing, you ought to know its name.
+>
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.
--
Paweł Jakub Dawidek
Network Administrator.
Am I Evil? Yes, I Am.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
iQCVAwUBPF5eBz/PhmMH/Mf1AQFSEQP+Ir/rGLnVKuDUow27z4A6gGNBksGFFzFb
6wSB4rO8jDYjihIYlHBFsSXGE8Wn05zpfdmb3k4v8oIz+ERFul31S+4whCHEfGJF
ZJacRyGS08IQ6WyBqfL99Wfxs39SbfNS5ckWvgvVCVqdiSNpj7SzoYxAUSfL57o5
7fNCgmiQtao=
=COd3
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020204111015.D45984>
