Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Feb 2002 03:40:42 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        =?iso-8859-1?Q?Pawe=B3?= Jakub Dawidek <nick@garage.freebsd.pl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: File name.
Message-ID:  <3C5E733A.25EE304C@mindspring.com>
References:  <20020204111015.D45984@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Pawe=B3 Jakub Dawidek wrote:
> 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.

Look at the "open" and "exec" source code.

The "." is interpreted in the context of the current
directory for the current process for the lookup.

The answer is to know what "." means, in context.  If
you don't have a current process from which to get a
pointer to the current directory vnode, then you will
need to make one up yourself.

-- Terry

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?3C5E733A.25EE304C>