Thanks a lot for your quick reply! Actually, I have found this code already, but as I know, dogetcwd is not exported by the kernel (not found in the include files). How can I call this function?
2008/5/20 <[EMAIL PROTECTED]>: > On Tue, 20 May 2008, NiuLin wrote: > > Hello everyone: >> When I am programming a kernel module for Solaris, I encountered one >> problem: I cannot get the the absolute path for the current working >> directory of the current process. >> >> In user space, we can do this by calling getcwd(), but this function does >> not take kernel address as parameter so I can not call it in the kernel. >> >> Then how can I getcwd in the kernel? >> >> I can get the vnode pointer of the current dir, If there are any some easy >> ways to convert the vnode pointer to the absolute path name, it's ok too. >> > > Use this one: > > > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/lookup.c#vnodetopath > > FrankH. > -- Thanks and Regards, Niu Lin
_______________________________________________ opensolaris-discuss mailing list [email protected]
