From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3ruj-00080F-JG for qemu-devel@nongnu.org; Tue, 21 Aug 2012 13:06:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3rui-0002r6-7Y for qemu-devel@nongnu.org; Tue, 21 Aug 2012 13:06:49 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:52626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3rui-0002kQ-2k for qemu-devel@nongnu.org; Tue, 21 Aug 2012 13:06:48 -0400 Received: by mail-yw0-f45.google.com with SMTP id p34so35187yhp.4 for ; Tue, 21 Aug 2012 10:06:48 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Tue, 21 Aug 2012 12:05:53 -0500 Message-Id: <1345568757-14365-20-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1345568757-14365-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1345568757-14365-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 19/23] slirp: Improve error reporting of inaccessible smb directories List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com From: Jan Kiszka Instead of guessing, print the error code returned by access. Signed-off-by: Jan Kiszka (cherry picked from commit 22a61f365df83d5d7884cceb1c462295977cb2db) Signed-off-by: Michael Roth --- net/slirp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index d3fcbf4..49f55bc 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -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; } -- 1.7.9.5