On Tue, 20 May 2008, NiuLin wrote:

> Thanks!
> I'm sorry I have missed some information in my original post, I'm writing
> the module for Solaris 8,  I checked the header files of Solaris 8 but
> cannot find vnodetopath. Which function can I use on Solaris 8?

Please ask Sun Developer support for S8, this forum is about OpenSolaris 
...

FrankH.

>
>
> 2008/5/20 <[EMAIL PROTECTED]>:
>
>> On Tue, 20 May 2008, NiuLin wrote:
>>
>>  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?
>>>
>>
>> #include </sys/pathname.h>
>>
>> for vnodetopath().
>>
>> FrankH.
>>
>>
>>> 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
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> No good can come from selling your freedom, not for all the gold in the
>> world,
>> for the value of this heavenly gift far exceeds that of any fortune on
>> earth.
>>
>> ------------------------------------------------------------------------------
>>
>
>
>
> -- 
> Thanks and Regards,
> Niu Lin
>

------------------------------------------------------------------------------
No good can come from selling your freedom, not for all the gold in the world,
for the value of this heavenly gift far exceeds that of any fortune on earth.
------------------------------------------------------------------------------
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to