qa: newlib: better messages in 100-files
This commit is contained in:
parent
965d316ac4
commit
511bbd36af
|
@ -21,13 +21,13 @@ main(int argc, char** argv) {
|
||||||
i = fprintf(fp, "%s works.\n", "fprintf");
|
i = fprintf(fp, "%s works.\n", "fprintf");
|
||||||
if(i <= 0){
|
if(i <= 0){
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
printf("Can't write 'fprintf works.' to %s", output);
|
printf("Can't write 'fprintf works.' to %s (fprintf returned %d)", output, i);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
i = fputs("fputs works.\n", fp);
|
i = fputs("fputs works.\n", fp);
|
||||||
if(i == EOF){
|
if(i == EOF){
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
printf("Can't write 'fputs works.' to %s", output);
|
printf("Can't write 'fputs works.' to %s (fputs returned EOF)", output);
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
Loading…
Reference in New Issue