Instead of guessing, print the error code returned by access.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
(cherry picked from commit
22a61f365df83d5d7884cceb1c462295977cb2db)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
}
if (access(exported_dir, R_OK | X_OK)) {
- error_report("no such directory '%s', or you do not have permission "
- "to access it, please check it", exported_dir);
+ error_report("error accessing shared directory '%s': %s",
+ exported_dir, strerror(errno));
return -1;
}