btrfs-progs: select-super: use message helpers for error messages

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-09-19 12:17:19 +02:00
parent b959a9a16b
commit 3f65090ba9
1 changed files with 3 additions and 4 deletions

View File

@ -54,8 +54,7 @@ int main(int argc, char **argv)
case 's':
num = arg_strtou64(optarg);
if (num >= BTRFS_SUPER_MIRROR_MAX) {
fprintf(stderr,
"ERROR: super mirror should be less than: %d\n",
error("super mirror should be less than: %d",
BTRFS_SUPER_MIRROR_MAX);
exit(1);
}
@ -70,7 +69,7 @@ int main(int argc, char **argv)
return 1;
if (bytenr == 0) {
fprintf(stderr, "Please select the super copy with -s\n");
error("please select the super copy with -s");
print_usage();
}
@ -88,7 +87,7 @@ int main(int argc, char **argv)
root = open_ctree(argv[optind], bytenr, 1);
if (!root) {
fprintf(stderr, "Open ctree failed\n");
error("open ctree failed");
return 1;
}