init: use ErrnoErrorf() instead of ErrnoError() << StringPrintf()
Test: force init to print this line and see the log message Change-Id: Ibb74572347f915cd76cc50f4c19126b66f562810
This commit is contained in:
parent
f8e6bf6d81
commit
57b9428471
1 changed files with 2 additions and 3 deletions
|
@ -249,9 +249,8 @@ Result<void> SetProcessAttributes(const ProcessAttributes& attr) {
|
|||
|
||||
for (const auto& rlimit : attr.rlimits) {
|
||||
if (setrlimit(rlimit.first, &rlimit.second) == -1) {
|
||||
return ErrnoError() << StringPrintf(
|
||||
"setrlimit(%d, {rlim_cur=%ld, rlim_max=%ld}) failed", rlimit.first,
|
||||
rlimit.second.rlim_cur, rlimit.second.rlim_max);
|
||||
return ErrnoErrorf("setrlimit({}, {{rlim_cur={}, rlim_max={}}}) failed", rlimit.first,
|
||||
rlimit.second.rlim_cur, rlimit.second.rlim_max);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue