sbin/hammer2: Fix -Werror=format-truncation= warning
commit7947b1995bcae4fab571d43acdcc3d441f05beb2
authorTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 7 Oct 2023 10:34:46 +0000 (7 03:34 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Sun, 8 Oct 2023 15:43:21 +0000 (8 08:43 -0700)
tree17e7473beaebf10d4575d842fa7c23c5994e7a6c
parent944bf0dfc70085721315b8d26a985eba0100b79e
sbin/hammer2: Fix -Werror=format-truncation= warning

The first snprintf is formatting a potentially longer string into
a smaller buffer. Expanding filename[] size to larger than pfs.name[]
fixes a format-truncation warning, but that generates a second
format-truncation warning on formatting the string back to pfs.name[]
in the second snprintf. The second snprintf can be done with strlcpy.
sbin/hammer2/cmd_snapshot.c