bin/: use xbps logging functions more

This commit is contained in:
classabbyamp
2023-02-09 04:54:36 -05:00
committed by Duncan Overbruck
parent 7391a7b213
commit 1271a3dbed
19 changed files with 94 additions and 95 deletions

View File

@@ -84,7 +84,7 @@ main(int argc, char **argv)
if (mode && strcmp(mode, "sha256")) {
/* sha256 is the only supported mode currently */
fprintf(stderr, "%s: unsupported digest mode\n", progname);
xbps_error_printf("%s: unsupported digest mode\n", progname);
exit(EXIT_FAILURE);
}
@@ -96,7 +96,7 @@ main(int argc, char **argv)
} else {
for (int i = 0; i < argc; i++) {
if (!xbps_file_sha256(sha256, sizeof sha256, argv[i])) {
fprintf(stderr,
xbps_error_printf(
"%s: couldn't get hash for %s (%s)\n",
progname, argv[i], strerror(errno));
exit(EXIT_FAILURE);