usr.sbin/makefs/hammer2: Support recursive read for "-o R" option
"-o R" option currently creates 0 byte file if a given path is
a directory, as directory inode size is set to 0.
Change this to recursively walk directories, and retrieve directories
and regular files under that directory. Specifying "-o R=/" does
the reverse of what makefs(8) does.
It currently has following limitations.
- Only directory and regular file are supported, other types are ignored.
- Hard links are not ignored, but files are retrieved as different inodes
and link count is not preserved.
- Inode timestamp is not preserved.
- Anything that HAMMER2 and this option support, but underlying
file system doesn't is unsupported.