Changeset 4934 for trunk/oscam-simples.c
- Timestamp:
- 04/06/11 00:14:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-simples.c
r4907 r4934 536 536 if (select_ret==-1) 537 537 { 538 cs_log("ERROR reading from fd %d select_ret=%i , errno=%d",in_fd, select_ret, errno);538 cs_log("ERROR reading from fd %d select_ret=%i (errno=%d %s)",in_fd, select_ret, errno, strerror(errno)); 539 539 return 0; 540 540 } … … 542 542 if (FD_ISSET(in_fd, &erfds)) 543 543 { 544 cs_log("ERROR reading from fd %d select_ret=%i , errno=%d",in_fd, select_ret, errno);544 cs_log("ERROR reading from fd %d select_ret=%i (errno=%d %s)",in_fd, select_ret, errno, strerror(errno)); 545 545 return 0; 546 546 } … … 594 594 *tmp = malloc (size); 595 595 if(*tmp == NULL){ 596 cs_log("Couldn't allocate memory (errno=%d )!", errno);596 cs_log("Couldn't allocate memory (errno=%d %s)!", errno, strerror(errno)); 597 597 if(quiterror > -1) cs_exit(quiterror); 598 598 } else { … … 608 608 *tmp = realloc (*tmp, size); 609 609 if(*tmp == NULL){ 610 cs_log("Couldn't allocate memory (errno=%d )!", errno);610 cs_log("Couldn't allocate memory (errno=%d %s)!", errno, strerror(errno)); 611 611 free(*tmp2); 612 612 if(quiterror > -1) cs_exit(quiterror); … … 729 729 int ch; 730 730 if((src = fopen(srcfile, "r"))==NULL) { 731 cs_log("Error opening file %s for reading (errno=%d )!", srcfile, errno);731 cs_log("Error opening file %s for reading (errno=%d %s)!", srcfile, errno, strerror(errno)); 732 732 return(-1); 733 733 } 734 734 if((dest = fopen(destfile, "w"))==NULL) { 735 cs_log("Error opening file %s for writing (errno=%d )!", destfile, errno);735 cs_log("Error opening file %s for writing (errno=%d %s)!", destfile, errno, strerror(errno)); 736 736 fclose(src); 737 737 return(-1); … … 745 745 fputc(ch, dest); 746 746 if(ferror(dest)) { 747 cs_log("Error while writing to file %s (errno=%d )!", destfile, errno);747 cs_log("Error while writing to file %s (errno=%d %s)!", destfile, errno, strerror(errno)); 748 748 fclose(src); 749 749 fclose(dest); … … 764 764 if(file_copy(destfile, bakfile) < 0){ 765 765 cs_log("Error copying original config file %s to %s. The original config will be left untouched!", destfile, bakfile); 766 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d )!", tmpfile, errno);766 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d %s)!", tmpfile, errno, strerror(errno)); 767 767 return(1); 768 768 } … … 772 772 cs_log("An error occured while writing the new config file %s.", destfile); 773 773 if(rc == -2) cs_log("The config will be missing or only partly filled upon next startup as this is a non-recoverable error! Please restore from backup or try again.", destfile); 774 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d )!", tmpfile, errno);774 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d %s)!", tmpfile, errno, strerror(errno)); 775 775 return(1); 776 776 } 777 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d )!", tmpfile, errno);777 if(remove(tmpfile) < 0) cs_log("Error removing temp config file %s (errno=%d %s)!", tmpfile, errno, strerror(errno)); 778 778 return(0); 779 779 }
Note:
See TracChangeset
for help on using the changeset viewer.