Re: Getting debugfs mountpoint?

2012-09-16 Thread Rob Landley
>From userspace? Something like: grep " debugfs " /proc/mounts | awk '{print $2}' | xargs echo -e >From kernel space? There isn't guaranteed to be _one_, you can mount multiple instances of most filesystems, and with container support you can even have multiple debugfs superblocks. Rob On

Re: Getting debugfs mountpoint?

2012-09-16 Thread Rob Landley
From userspace? Something like: grep debugfs /proc/mounts | awk '{print $2}' | xargs echo -e From kernel space? There isn't guaranteed to be _one_, you can mount multiple instances of most filesystems, and with container support you can even have multiple debugfs superblocks. Rob On Fri,

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 07:17:12PM -0700, Jacob Sowles wrote: > The first instance of my code calls debugfs_create_file and stores a > pointer to the dentry of that directory. But when the second instance > calls debugfs_create_file, the function returns NULL because that > directory already

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
debugfs_create_dir, rather. Not debugfs_create_file. On Fri, Sep 14, 2012 at 7:17 PM, Jacob Sowles wrote: > The first instance of my code calls debugfs_create_file and stores a > pointer to the dentry of that directory. But when the second instance > calls debugfs_create_file, the function

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
The first instance of my code calls debugfs_create_file and stores a pointer to the dentry of that directory. But when the second instance calls debugfs_create_file, the function returns NULL because that directory already exists, so it doesn't return the dentry that I need. On Fri, Sep 14, 2012

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 07:07:43PM -0700, Jacob Sowles wrote: > Multiple instances of my code can be run simultaneously, and all > instances use the same debugfs directory, so I need the path to the > debugfs root directory so that I can use filp_open to get the dentry > for that directory.

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
Multiple instances of my code can be run simultaneously, and all instances use the same debugfs directory, so I need the path to the debugfs root directory so that I can use filp_open to get the dentry for that directory. Jacob On Fri, Sep 14, 2012 at 6:57 PM, Al Viro wrote: > On Fri, Sep 14,

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 06:49:01PM -0700, Jacob Sowles wrote: > Is there an easy way to get the path to where debugfs is mounted? I > found a function called debugfs_find_mountpoint(), which is exactly > what I want, but it’s not exported, so I can’t use it. The only > exported debugfs functions

Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
Is there an easy way to get the path to where debugfs is mounted? I found a function called debugfs_find_mountpoint(), which is exactly what I want, but it’s not exported, so I can’t use it. The only exported debugfs functions that I could find are the ones that create, remove, etc. Jacob -- To

Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
Is there an easy way to get the path to where debugfs is mounted? I found a function called debugfs_find_mountpoint(), which is exactly what I want, but it’s not exported, so I can’t use it. The only exported debugfs functions that I could find are the ones that create, remove, etc. Jacob -- To

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 06:49:01PM -0700, Jacob Sowles wrote: Is there an easy way to get the path to where debugfs is mounted? I found a function called debugfs_find_mountpoint(), which is exactly what I want, but it’s not exported, so I can’t use it. The only exported debugfs functions that

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
Multiple instances of my code can be run simultaneously, and all instances use the same debugfs directory, so I need the path to the debugfs root directory so that I can use filp_open to get the dentry for that directory. Jacob On Fri, Sep 14, 2012 at 6:57 PM, Al Viro v...@zeniv.linux.org.uk

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 07:07:43PM -0700, Jacob Sowles wrote: Multiple instances of my code can be run simultaneously, and all instances use the same debugfs directory, so I need the path to the debugfs root directory so that I can use filp_open to get the dentry for that directory. What's

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
The first instance of my code calls debugfs_create_file and stores a pointer to the dentry of that directory. But when the second instance calls debugfs_create_file, the function returns NULL because that directory already exists, so it doesn't return the dentry that I need. On Fri, Sep 14, 2012

Re: Getting debugfs mountpoint?

2012-09-14 Thread Jacob Sowles
debugfs_create_dir, rather. Not debugfs_create_file. On Fri, Sep 14, 2012 at 7:17 PM, Jacob Sowles sowl...@gmail.com wrote: The first instance of my code calls debugfs_create_file and stores a pointer to the dentry of that directory. But when the second instance calls debugfs_create_file, the

Re: Getting debugfs mountpoint?

2012-09-14 Thread Al Viro
On Fri, Sep 14, 2012 at 07:17:12PM -0700, Jacob Sowles wrote: The first instance of my code calls debugfs_create_file and stores a pointer to the dentry of that directory. But when the second instance calls debugfs_create_file, the function returns NULL because that directory already exists,