fdmnt = open_path_or_dev_mnt(dev_path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: can't access '%s'\n", dev_path);
+ if (errno == EINVAL)
+ fprintf(stderr,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ dev_path);
+ else
+ fprintf(stderr, "ERROR: can't access '%s': %s\n",
+ dev_path, strerror(errno));
return 1;
}
fdmnt = open_path_or_dev_mnt(path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: can't access \"%s\": %s\n",
- path, strerror(errno));
+ if (errno == EINVAL)
+ fprintf(stderr,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ path);
+ else
+ fprintf(stderr, "ERROR: can't access '%s': %s\n",
+ path, strerror(errno));
goto leave_with_error;
}
fdmnt = open_path_or_dev_mnt(path, &dirstream);
if (fdmnt < 0) {
- ERR(!do_quiet, "ERROR: can't access '%s'\n", path);
+ if (errno == EINVAL)
+ ERR(!do_quiet,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ path);
+ else
+ ERR(!do_quiet, "ERROR: can't access '%s': %s\n",
+ path, strerror(errno));
return 1;
}
fdmnt = open_path_or_dev_mnt(path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: could not open %s: %s\n",
- path, strerror(errno));
+ if (errno == EINVAL)
+ fprintf(stderr,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ path);
+ else
+ fprintf(stderr, "ERROR: can't access '%s': %s\n",
+ path, strerror(errno));
ret = 1;
goto out;
}
fdmnt = open_path_or_dev_mnt(path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: can't access '%s'\n", path);
+ if (errno == EINVAL)
+ fprintf(stderr,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ path);
+ else
+ fprintf(stderr, "ERROR: can't access '%s': %s\n",
+ path, strerror(errno));
return 1;
}