system/core
修订版 | 7397fcd4e19ab67603f1831fbb775d0ab7286c3a (tree) |
---|---|
时间 | 2018-05-25 19:27:22 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
logd: show the concrete error if cap_set_proc fails
@@ -137,8 +137,8 @@ static int drop_privs(bool klogd, bool auditd) { | ||
137 | 137 | } |
138 | 138 | if (cap_set_proc(caps.get()) < 0) { |
139 | 139 | android::prdebug( |
140 | - "failed to set CAP_SETGID, CAP_SYSLOG or CAP_AUDIT_CONTROL (%d)", | |
141 | - errno); | |
140 | + "failed to set CAP_SETGID, CAP_SYSLOG or CAP_AUDIT_CONTROL (%s)", | |
141 | + strerror(errno)); | |
142 | 142 | if (!eng) return -1; |
143 | 143 | } |
144 | 144 |