From 0d73a81611c62419411b8e033d0f3b3a01472918 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Feb 2019 17:48:40 +0100 Subject: [PATCH] bootctl: properly handle readdir() errors --- src/boot/bootctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index be8a90445c..a529989ea0 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")) -- 2.25.1