mount.cifs: unclear error message with "credentials"
authorSteve French <stevef@smfhomehp.(none)>
Tue, 26 Aug 2008 18:01:15 +0000 (13:01 -0500)
committerSteve French <stevef@smfhomehp.(none)>
Tue, 26 Aug 2008 18:01:15 +0000 (13:01 -0500)
Thanks to Christophe Curis for the suggestion

source/client/mount.cifs.c

index dd878aa07b41448fef6eb032183363976d5c9388..9d2b44919571f0e7dd7bb697e41820bd47c752ef 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)) {
@@ -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 {