scst_pres: Make a few error messages more clear (merge r5733 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@5776 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-09-04 13:46:14 +00:00
parent 66af9edb6e
commit 6e4b41416e

View File

@@ -1106,19 +1106,21 @@ int scst_pr_set_file_name(struct scst_device *dev, char **prev,
res = -EINVAL;
if (pr_file_name[0] != '/') {
PRINT_ERROR("PR file name must be absolute!");
PRINT_ERROR("PR file name %s must be absolute!", pr_file_name);
goto out;
}
file_mode = scst_get_file_mode(pr_file_name);
if (file_mode >= 0 && !S_ISREG(file_mode) && !S_ISBLK(file_mode)) {
PRINT_ERROR("PR file name must be file or block device!");
PRINT_ERROR("PR file name %s must be file or block device!",
pr_file_name);
goto out;
}
res = -ENOENT;
if (!scst_parent_dir_exists(pr_file_name)) {
PRINT_ERROR("PR file name parent directory doesn't exist");
PRINT_ERROR("PR file name %s parent directory doesn't exist",
pr_file_name);
goto out;
}