getCWD in kernel space

Eren Erdemli erenerdemli at gmail.com
Sat Jun 30 15:53:06 UTC 2007


Hello hackers,

Sorry to disturb you's but I have a question and would like to know if you
can assist me.

I am new to freebsd programing and I am trying to get the current working
directory of  the curthread.

I have hook on to the sys calls and redirected the mkdir

my_mkdir(struct thread *p, (void*) uap)
{
   mkdir_args = .....................
   ........
  getCWD()???????????
}

the given path in the args is relative to the current path if not supplied
fully.  So who would I get the path of file.

Your help is truly appreciated as I I have been trying it for few days now.
no result apart from kernel panics.

Thanks in advance
Eren


More information about the freebsd-hackers mailing list