linker: use %m in error messages.
Change-Id: Ib799abdd2628fa1c54a2e479c6455b44d40deae1
diff --git a/linker/linker_relocate.cpp b/linker/linker_relocate.cpp
index 5f993ba..8f85871 100644
--- a/linker/linker_relocate.cpp
+++ b/linker/linker_relocate.cpp
@@ -189,8 +189,7 @@
if (phdr_table_protect_segments(relocator.si->phdr, relocator.si->phnum,
relocator.si->load_bias,
relocator.si->should_pad_segments()) < 0) {
- DL_ERR("can't protect segments for \"%s\": %s",
- relocator.si->get_realpath(), strerror(errno));
+ DL_ERR("can't protect segments for \"%s\": %m", relocator.si->get_realpath());
return false;
}
return true;
@@ -200,8 +199,8 @@
if (phdr_table_unprotect_segments(relocator.si->phdr, relocator.si->phnum,
relocator.si->load_bias,
relocator.si->should_pad_segments()) < 0) {
- DL_ERR("can't unprotect loadable segments for \"%s\": %s",
- relocator.si->get_realpath(), strerror(errno));
+ DL_ERR("can't unprotect loadable segments for \"%s\": %m",
+ relocator.si->get_realpath());
return false;
}
return true;