]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: properly handle readdir() errors
authorLennart Poettering <lennart@poettering.net>
Wed, 6 Feb 2019 16:48:40 +0000 (17:48 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000 (12:41 +0100)
src/boot/bootctl.c

index be8a90445c93ee2be45b5b9f13fc5f58035b9fd8..a529989ea0e840b062b369f1cadd67be9d1d5118 100644 (file)
@@ -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"))