sbin/hammer: Change fprintf/exit to err variants [2/2]
commit02318f07beee82780ba5c99613d9e26974d14eb4
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 15 Dec 2016 07:56:17 +0000 (15 16:56 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 15 Dec 2016 19:07:49 +0000 (16 04:07 +0900)
treebe13c5818354728fd643e03669bbd7714125884e
parentbac217f3427aaf2d01616d8630b4d8e05a865bfd
sbin/hammer: Change fprintf/exit to err variants [2/2]

Change
fprintf(stderr, ...); exit(1);
and
perror(...); exit(1);
to
err(1, ...) or errx(1, ...);
where possible for consistency.

This commit is just conversion to err(3) variants.
Messages themselves are not changed, except for removing
strerror(errno) for err(3), and removing trailing \n,
though err variants add program name in the messages.

err(3) and variants are non standard BSD functions, but HAMMER
userspace has been using BSD stuff aside from the existing
err/errx. Also note that err(3) is available in Linux as well.
15 files changed:
sbin/hammer/blockmap.c
sbin/hammer/cmd_dedup.c
sbin/hammer/cmd_history.c
sbin/hammer/cmd_info.c
sbin/hammer/cmd_mirror.c
sbin/hammer/cmd_pfs.c
sbin/hammer/cmd_recover.c
sbin/hammer/cmd_remote.c
sbin/hammer/cmd_softprune.c
sbin/hammer/cmd_strip.c
sbin/hammer/cmd_version.c
sbin/hammer/cmd_volume.c
sbin/hammer/hammer.c
sbin/newfs_hammer/newfs_hammer.c
usr.bin/undo/undo.c