From 37215fea864f73935ece375dfdfb5c1db32cf43c Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 1 Dec 2017 19:40:52 +0000 Subject: [PATCH] ld_lib_open: Propagate error from open() correctly In practice most callers ignored it anyway, and the only caller that would not ignore it would usually have failed with an error from realpath() already. Signed-off-by: Simon McVittie <smcv@collabora.com> --- utils/ld-libs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/ld-libs.c b/utils/ld-libs.c index fb2b49940..53bbd62b8 100644 --- a/utils/ld-libs.c +++ b/utils/ld-libs.c @@ -365,6 +365,11 @@ ld_lib_open (ld_libs *ldlibs, const char *name, int i, int *code, char **message } else { + int errsv = errno; + + _capsule_set_error( code, message, errsv, + "Cannot open \"%s\": %s", + ldlibs->needed[i].path, strerror( errsv ) ); return 0; } } -- GitLab