RE: Getting full pathname for dentry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Meanwhile i came to the conclusion that i can't use user_path_walk and therefore have to use d_path like this:

pathname = d_path( dentry, current->fs->rootmnt, buffer, namelen );

Unfortunately this doesn't get across mount points, meaning if /usr is a mountpoint then touch /usr/test gives "/test" as the full pathname.

Any hints are welcome!


From: "Gerd M" <gerd_m1977@hotmail.com>
To: kernelnewbies@nl.linux.org
Subject: Getting full pathname for dentry
Date: Fri, 16 Apr 2004 10:00:44 +0000

I need to get the full pathname for a given dentry.
After searching through previous posts my code looks like this:

...
struct nameidata nd;
user_path_walk( dentry->d_name.name, &nd );
fullname = d_path( nd.dentry, nd.mnt, fullname, namelen );
...

I get an "Unable to handle kernel paging request..." as soon as d_path is called.
Any advice?


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux