Re: [osol-discuss] Installation Problem

2008-06-16 Thread NiuLin
looks the image is corrupted. Try to download it again, and verify the check
sum before you burn the cd.
Good luck!
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] Interactive mode

2008-06-11 Thread NiuLin
do this:
export PS1=[EMAIL PROTECTED] \W]

you can add this to your profile so that it takes effect each time you log
on.

On Wed, Jun 11, 2008 at 4:20 PM, taddy [EMAIL PROTECTED] wrote:

 hi guys i am new to solaris, i have installed solaris 10, my problem is
 when i am in command line it does not show me the directory i will be
 working in,
 for example in red hat if you tpye /etc/samba you get the following
 [EMAIL PROTECTED] samba] showing that i am in the samba directory but 
 when i
 do the same in solaris 10 it does not give me anything

 how can i make it show me what directory i will be working from without
 typing the pwd command


 This message posted from opensolaris.org
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org




-- 
Thanks and Regards,
Niu Lin
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] User profile

2008-06-10 Thread NiuLin
If you want to use .bashrc, just add these to the .profile file:
if [-f $HOME/.bashrc ]; then
   . $HOME/.bashrc
fi

On Thu, Jun 5, 2008 at 2:27 AM, Emmanuel De Paepe 
[EMAIL PROTECTED] wrote:

 Is there a particular reason why there is a '.profile' when adding a new
 user, and not a '.bashrc' like the standard user created during
 installation?


 This message posted from opensolaris.org
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org




-- 
Thanks and Regards,
Niu Lin
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] How to get timestamp in Solaris Kernel

2008-06-05 Thread NiuLin
That's great! thank you!
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

[osol-discuss] How to get timestamp in Solaris Kernel

2008-06-05 Thread NiuLin
Hi,
I want to measure the time elapsed to execute a code block of my driver, so
I use a structure like this:

begin_time = x
{
  // my code block
}
end_time = x

elapsed = end_time - begin_time


Now I want to know how can I get the current timestamp in the Kernel to
assign to begin_time and end_time?
The timestamp should be very accurate, like the timestamp variable in
DTrace, which can measure time in nanoseconds.

Thank you!
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

[osol-discuss] How to get current working directory of the current process in the kernel

2008-05-20 Thread NiuLin
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.

Thanks a lot!
Niu Lin.
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] How to get current working directory of the current process in the kernel

2008-05-20 Thread NiuLin
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
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] How to get current working directory of the current process in the kernel

2008-05-20 Thread NiuLin
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?


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
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org