From 34c073c35192850710582b3f558c9fb761e2c24f Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 27 Aug 2008 17:00:00 -0500 Subject: mount.cifs: unclear error message with "credentials" Thanks to Christophe Curis for the suggestion (This used to be commit 3b5ad9190d2ad6d2ca0a569194bdff9003bda13b) --- source3/client/mount.cifs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/client') diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c index dd878aa07b..9d2b449195 100644 --- a/source3/client/mount.cifs.c +++ b/source3/client/mount.cifs.c @@ -196,7 +196,7 @@ static int open_cred_file(char * file_name) line_buf = (char *)malloc(4096); if(line_buf == NULL) { fclose(fs); - return -ENOMEM; + return ENOMEM; } while(fgets(line_buf,4096,fs)) { @@ -537,7 +537,8 @@ static int parse_options(char ** optionsp, int * filesys_flags) if (value && *value) { rc = open_cred_file(value); if(rc) { - printf("error %d opening credential file %s\n",rc, value); + printf("error %d (%s) opening credential file %s\n", + rc, strerror(rc), value); return 1; } } else { -- cgit