tombstoned: silence spurious error messages.

am: 8498016b81

Change-Id: I6385f9fbcdd17e67d7e60bcfddd9c164b24e7f8c
This commit is contained in:
Josh Gao 2017-01-24 02:34:59 +00:00 committed by android-build-merger
commit 8fb50dc76c

View file

@ -85,7 +85,13 @@ static void find_oldest_tombstone() {
std::string path = android::base::StringPrintf("%stombstone_%02zu", kTombstoneDirectory, i);
struct stat st;
if (stat(path.c_str(), &st) != 0) {
PLOG(ERROR) << "failed to stat " << path;
if (errno == ENOENT) {
oldest_tombstone = i;
break;
} else {
PLOG(ERROR) << "failed to stat " << path;
continue;
}
}
if (st.st_mtime < oldest_time) {