Mapping Inode to File
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Artur Baruchi
Hi Guys.
Is there a way to map an Inode number to a File (file path and name) in a kernel module ?
Imagine this:
ln /foo/bar/baz /bar/baz/foo
sleep 2147483647 < /foo/bar/baz &pivot_root /mnt /mnt/asd
chroot /mnt/asd/foo
What is the name you'd assign to that inode?
Sorry, didnt understand your point.
Could you please clarify?
Note that I need to retrieve the file name in Kernel Space, Im able to get the inode, but now I need to convert this inode to a name (something that I could use).
Thanks in advance.
Att.
Artur Baruchi
Quoted 17 lines · Bodo Eggert
Quoted 4 lines · Artur Baruchi
Hi Guys.
Is there a way to map an Inode number to a File (file path and name) in a kernel module ?
Imagine this:
ln /foo/bar/baz /bar/baz/foo
sleep 2147483647 < /foo/bar/baz &pivot_root/mnt/mnt/asd
chroot/mnt/asd/fooWhat is the name you'd assign to that inode?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
Quoted 3 lines · Artur Baruchi
Sorry, didnt understand your point.
Could you please clarify?
The point is that, no, it's not simple to do this at all.
Quoted 3 lines
Note that I need to retrieve the file name in Kernel Space, Im able to get the inode, but now I need to convert this inode to a name (something that I could use).
How about explaining why you need to get the file name from within the kernel? Perhaps there's a better way to do what you are trying to accomplish.
thanks,
greg k-h