mount.cifs: unclear error message with "credentials"
authorSteve French <stevef@smfhomehp.(none)>
Tue, 26 Aug 2008 18:04:44 +0000 (13:04 -0500)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Aug 2008 14:07:54 +0000 (16:07 +0200)
Thanks to Christophe Curis for the suggestion
(cherry picked from commit a122df5dc01ed9767c53d77a73aabd44f7c8a7ca)

source/client/mount.cifs.c

index c24c22e1c2757d660f7bc5de3cf0d95700c746d7..af50cd9d474bb630f966cbc386353802720a8583 100644 (file)
@@ -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)) {
@@ -533,7 +533,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 {