Skip to content
Snippets Groups Projects
Commit 73e68b5a authored by rswindell's avatar rswindell
Browse files

Added errno descriptions to error messages (using strerror)

parent 8828a153
Branches
Tags
No related merge requests found
......@@ -69,7 +69,7 @@ BOOL read_node_cfg(scfg_t* cfg, char* error)
strcpy(fname,"node.cnf");
sprintf(str,"%s%s",cfg->node_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......@@ -186,7 +186,7 @@ BOOL read_main_cfg(scfg_t* cfg, char* error)
strcpy(fname,"main.cnf");
sprintf(str,"%s%s",cfg->ctrl_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......@@ -406,7 +406,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
strcpy(fname,"msgs.cnf");
sprintf(str,"%s%s",cfg->ctrl_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......
......@@ -51,7 +51,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
strcpy(fname,"file.cnf");
sprintf(str,"%s%s",cfg->ctrl_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......@@ -435,7 +435,7 @@ BOOL read_xtrn_cfg(scfg_t* cfg, char* error)
strcpy(fname,"xtrn.cnf");
sprintf(str,"%s%s",cfg->ctrl_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......@@ -664,7 +664,7 @@ BOOL read_chat_cfg(scfg_t* cfg, char* error)
strcpy(fname,"chat.cnf");
sprintf(str,"%s%s",cfg->ctrl_dir,fname);
if((instream=fnopen(NULL,str,O_RDONLY))==NULL) {
sprintf(error,"%d opening %s",errno,str);
sprintf(error,"%d (%s) opening %s",errno,strerror(errno),str);
return(FALSE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment