Date: Tue, 04 Nov 1997 13:57:01 -0500 From: Chris Vance <cvance@tis.com> To: freebsd-hackers@freebsd.org Cc: cvance@tis.com Subject: absolute pathname in kernel Message-ID: <199711041856.NAA26688@clipper.hq.tis.com>
next in thread | raw e-mail | index | archive | help
Is there any easy way to obtain an absolute pathname from within the kernel? I would like to calculate the absolute pathname during the execve system call. For the most part, shells and programs use a full pathname, but this doesn't necessarily have to be the case. There doesn't seem to be any simple way to get this information. Assuming no simple way exists, what is the next best solution. Just start from the vnode of the current directory and keep going up one until the root is reached? In doing this, how would a pathname components be extracted? Would I need to open and read the parent directory until a match on the current directory is found? thanks, chris.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711041856.NAA26688>