Merge branch 'master' into topic/jsiwek/broxygen

This commit is contained in:
Jon Siwek 2013-10-03 13:06:23 -05:00
commit 68227f112d
89 changed files with 792 additions and 245 deletions

View file

@ -935,7 +935,7 @@ static const char* check_for_dir(const char* filename, bool load_pkgs)
return copy_string(filename);
}
FILE* open_file(const char* filename, const char** full_filename, bool load_pkgs)
static FILE* open_file(const char* filename, const char** full_filename, bool load_pkgs)
{
filename = check_for_dir(filename, load_pkgs);
@ -944,6 +944,13 @@ FILE* open_file(const char* filename, const char** full_filename, bool load_pkgs
FILE* f = fopen(filename, "r");
if ( ! f )
{
char buf[256];
strerror_r(errno, buf, sizeof(buf));
reporter->Error("Failed to open file %s: %s", filename, buf);
}
delete [] filename;
return f;
@ -1259,6 +1266,16 @@ void _set_processing_status(const char* status)
int fd = open(proc_status_file, O_CREAT | O_WRONLY | O_TRUNC, 0700);
if ( fd < 0 )
{
char buf[256];
strerror_r(errno, buf, sizeof(buf));
reporter->Error("Failed to open process status file '%s': %s",
proc_status_file, buf);
errno = old_errno;
return;
}
int len = strlen(status);
while ( len )
{