]> git.proxmox.com Git - qemu.git/commitdiff
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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:36:35 +0000 (15:36 -0500)
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>
net/slirp.c

index d3fcbf4a0ec9fb0e3c8362a531e82bcb204c86f5..49f55bcef96c6fc9846ccb39aadb1d788306606d 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;
     }