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/
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/