From: Lennart Poettering Date: Wed, 6 Feb 2019 16:48:40 +0000 (+0100) Subject: bootctl: properly handle readdir() errors X-Git-Tag: v242-rc1~218^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d73a81611c62419411b8e033d0f3b3a01472918;p=thirdparty%2Fsystemd.git bootctl: properly handle readdir() errors --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index be8a90445c9..a529989ea0e 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -583,7 +583,7 @@ static int install_binaries(const char *esp_path, bool force) { if (!d) return log_error_errno(errno, "Failed to open \""BOOTLIBDIR"\": %m"); - FOREACH_DIRENT(de, d, break) { + FOREACH_DIRENT(de, d, return log_error_errno(errno, "Failed to read \""BOOTLIBDIR"\": %m")) { int k; if (!endswith_no_case(de->d_name, ".efi"))