Appending eventual strerror() to event message line rather than to new line

This commit is contained in:
Thomas Schmitt 2010-06-25 17:44:13 +00:00
parent 7ddad30bec
commit cae1fab0de
2 changed files with 19 additions and 4 deletions

View File

@ -359,7 +359,7 @@ int Xorriso_read_lines(struct XorrisO *xorriso, FILE *fp, int *linecount,
linept= line;
base_length= 0;
while(1) {
fgot= Sfile_fgets_n(linept, SfileadrL - base_length + 1, fp,
fgot= Sfile_fgets_n(linept, SfileadrL - base_length - 1, fp,
!!(flag & (1 | 8)));
if(fgot == NULL) {
if(ferror(fp))
@ -938,12 +938,27 @@ int Xorriso_msgs_submit(struct XorrisO *xorriso,
else
xorriso->info_text[li+lt]= '\n';
xorriso->info_text[li+lt+1]= 0;
#ifdef NIX
/* <<< */
Xorriso_info(xorriso,4|(flag&3));
if(os_errno>0) {
sprintf(xorriso->info_text, "%ssys : %s\n",
pfx_list[(flag>>2)&15], strerror(os_errno));
sprintf(xorriso->info_text, "%s%s : %s\n",
pfx_list[(flag>>2)&15], sev_text, strerror(os_errno));
Xorriso_info(xorriso,4|(flag&3));
}
#else
if(os_errno>0) {
sprintf(xorriso->info_text + strlen(xorriso->info_text) - 1,
" : %s\n", strerror(os_errno));
}
Xorriso_info(xorriso,4|(flag&3));
#endif
return(1);
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.06.25.102140"
#define Xorriso_timestamP "2010.06.25.174329"