drgn icon indicating copy to clipboard operation
drgn copied to clipboard

helpers.linux.fs: add dentry_path_first_mount()

Open brenns10 opened this issue 1 year ago • 1 comments
trafficstars

This is a bit of a drive-by helper idea, inspired by something we have in drgn-tools. We frequently want a way to just convert a dentry to a path even if we don't know the vfsmount associated with the path we want. This helper is a good way to do it. Let me know your thoughts!

brenns10 avatar Aug 14 '24 18:08 brenns10

What do you think?

That's even better! I am not 100% attached to the specific heuristic either. It's really just a way to get any path for a dentry that goes all the way down to the root filesystem. I'll update this, probably tomorrow though. Thanks!

brenns10 avatar Aug 14 '24 22:08 brenns10