slirp: Improve error reporting of inaccessible smb directories
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 6 Jul 2012 06:40:48 +0000 (08:40 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Mon, 9 Jul 2012 15:39:24 +0000 (17:39 +0200)
Instead of guessing, print the error code returned by access.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
net/slirp.c

index eb80889572dbd61de0c18392fabecdb8c392561f..b82eab0a071543438f4e5d11ddd7cee8ba323c92 100644 (file)
@@ -504,8 +504,8 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
     }
 
     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;
     }