Kaydet (Commit) c03124eb authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Print a helpful error message if we are going to fail

Change-Id: I0685c9d2d857a9e994c616acb6d7ce106c7a7dad
üst 76a5c65f
......@@ -871,7 +871,11 @@ static inline int generate_phony_file(char* fn, char* content)
{
FILE* depfile;
depfile = fopen(fn, "w");
if(depfile)
if(!depfile)
{
fprintf(stderr, "Could not open '%s' for writing: %s\n", fn, strerror(errno));
}
else
{
fputs(content, depfile);
fclose(depfile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment