Merge "Add a comment to explain how errno is set" am: b488db911c am: ee7752efa1

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2052049

Change-Id: I32d96695290cbfe6ac1d863a7075b133c53b06be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-03-31 21:52:37 +00:00 committed by Automerger Merge Worker
commit 2f9831b4a8

View file

@ -215,6 +215,9 @@ bool SetAttributeAction::ExecuteForTask(int tid) const {
return false;
}
}
// The PLOG() statement below uses the error code stored in `errno` by
// WriteStringToFile() because access() only overwrites `errno` if it fails
// and because this code is only reached if the access() function returns 0.
PLOG(ERROR) << "Failed to write '" << value_ << "' to " << path;
return false;
}