e = errno;
close_file_or_dir(fd, dirstream);
if (ret < 0) {
- fprintf(stderr, "ERROR: quota command failed: %s\n",
- strerror(e));
+ error("quota command failed: %s", strerror(e));
return 1;
}
return 0;
}
if (ioctlnum != BTRFS_IOC_QUOTA_RESCAN && wait_for_completion) {
- fprintf(stderr, "ERROR: -w cannot be used with -s\n");
+ error("switch -w cannot be used with -s");
return 1;
}
if (ioctlnum == BTRFS_IOC_QUOTA_RESCAN) {
if (ret < 0) {
- fprintf(stderr, "ERROR: quota rescan failed: "
- "%s\n", strerror(e));
+ error("quota rescan failed: %s", strerror(e));
return 1;
} else {
printf("quota rescan started\n");