Unix Programming - kernel: current->pwd ?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2004 > kernel: current->pwd ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author kernel: current->pwd ?
vertigo

2004-10-30, 2:46 am

Hello
I use linux kernel 2.6, and i write module.
How can i read current process pwd (current path) ?
I tried:
current->fs->pwd->d_iname
but this returns only parent directory, and i need full path.
Where can i find it ?

Thanx
Michal

Steve Graegert

2004-10-30, 2:46 am

vertigo wrote:
> Hello
> I use linux kernel 2.6, and i write module.
> How can i read current process pwd (current path) ?
> I tried:
> current->fs->pwd->d_iname
> but this returns only parent directory, and i need full path.
> Where can i find it ?
>
> Thanx
> Michal
>


There is a _linux.kernel_ group, which would be a much better place to
ask Linux specific questions.
vertigo

2004-10-30, 7:46 am


> There is a _linux.kernel_ group, which would be a much better place to
> ask Linux specific questions.


sorry for OT: does anybody know any active _linux.kernel group (the
one's i found are almost empty, last posts are 2 weeks old), and maybe
someone knows any free NNTP server for _linux.kernel groups ?


Thanx
Michal

Steve Graegert

2004-10-30, 7:46 am

vertigo wrote:

>
>
> sorry for OT: does anybody know any active _linux.kernel group (the
> one's i found are almost empty, last posts are 2 weeks old), and maybe
> someone knows any free NNTP server for _linux.kernel groups ?


The group I just mentioned is the one to post linux questions to. It's
highly active with currently more than 30,000 messages according to my
news server which is a commercial one. If noting helps try Google groups
http://groups.google.com/groups?hl=...p=linux.kernel.

\Steve
Alex Sisson

2004-10-30, 7:46 am

vertigo <ax178@wp.pl> wrote in message news:<clvdo4$b8k$1@atlantis.news.tpi.pl>...
> Hello
> I use linux kernel 2.6, and i write module.
> How can i read current process pwd (current path) ?
> I tried:
> current->fs->pwd->d_iname
> but this returns only parent directory, and i need full path.
> Where can i find it ?
>
> Thanx
> Michal


Is it possible to get it from /proc/$$/cwd ?
Måns Rullgård

2004-10-30, 7:46 am

spam@alexs.org (Alex Sisson) writes:

> vertigo <ax178@wp.pl> wrote in message news:<clvdo4$b8k$1@atlantis.news.tpi.pl>...
>
> Is it possible to get it from /proc/$$/cwd ?


Might be tricky from inside the kernel.

--
Måns Rullgård
mru@inprovide.com
Artie Gold

2004-10-31, 2:46 am

vertigo wrote:
> Hello
> I use linux kernel 2.6, and i write module.
> How can i read current process pwd (current path) ?
> I tried:
> current->fs->pwd->d_iname
> but this returns only parent directory, and i need full path.
> Where can i find it ?
>
> Thanx
> Michal
>

Try asking in news:comp.os.linux.development.system

HTH,
--ag

--
Artie Gold -- Austin, Texas

http://it-matters.blogspot.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com