That recursive support routine serves to traverse the device-filesystem looking for particular device-files.

There’s some special codepaths for ZFS. As well as a safe-wrapper around getcwd & its own filepath-stripper helper used internally.

1.5/1.5 Fin for today! Tomorrow: Windows port! That looks more involved…