usr.sbin/makefs/hammer2: Fix link count handling in "-o R" option
commit2db6f39c39070c9f876ccbe7620fbffc7afcf58c
authorTomohiro Kusumi <tkusumi@netbsd.org>
Mon, 3 Jul 2023 07:23:04 +0000 (3 00:23 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Mon, 3 Jul 2023 12:41:19 +0000 (3 05:41 -0700)
tree83554a5f1b87d05c5cf7ca4743cec2f799077464
parentd541bdf518b24b3f6deb5a62fab0ca6492be4470
usr.sbin/makefs/hammer2: Fix link count handling in "-o R" option

Sanity check in hammer2_linkq_cleanup() is valid only when "-o R=/".
If a non-root directory was specified, not all links may exist under
that directory, and as a result unused linkq element remains.

While here change calloc to ecalloc and fix goto label name.
usr.sbin/makefs/hammer2.c