fs-util: introduce open_parent() helper
We often open the parent directory of a path. Let's add a common helper for that, that shortens our code a bit and adds some extra safety checks, for example it will fail if used on the root directory (which doesn't really have a parent). The helper is actually generalized from a function in btrfs-util.[ch] which already existed for this purpose.
Loading
Please register or sign in to comment