Subject: Re: kern/4099: Gather coredumps in one place
To: John F. Woods <firstname.lastname@example.org>
From: Ty Sarna <email@example.com>
Date: 09/09/1997 12:16:05
John F. Woods wrote:
> > Obviously if there is no name, one can't get the name. But when there is
> > a name, it should be possible to get it :-). Is there no way to
> > accomplish that in the kernel short of walking up the tree?
> No. I apologize for what I hope is a way-too-basic explanation, but:
> vnodes don't have names. Entry-names have vnodes. Walking the tree to find
I should have phrased the question more precisely:
"Is there no way to accomplish that in the kernel short of walking up
the tree _myself_?"
In other words, is there no getcwd()-like functionality in the kernel?
It seems like someone else would have probably needed it for something
Unfortunately, I don't understand the vnode system (esp. the locking
issues, which nobody seem to understand!) well enough to write something
like a vgetpath() myself. There are also some issues, like the fact
that I want the path relative to the One True "/", not the processes's
"/". Other uses might want a process-relative path, though. A
generalized vgetpath() would have to take the where-to-stop-walking-up
vnode as an argument.