]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: don't try to remove esp_path (#4407)
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 19 Oct 2016 19:15:20 +0000 (22:15 +0300)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Oct 2016 19:15:20 +0000 (21:15 +0200)
This is a follow-up for 9ee051b9c7623

src/boot/bootctl.c

index 13cf7e94f07fa2b7376ae400f6adce76096cc918..dc11b0d9dbf41bf7c43bcc4f2c9d65fe08ba064b 100644 (file)
@@ -918,7 +918,7 @@ static int remove_binaries(const char *esp_path) {
         if (q < 0 && r == 0)
                 r = q;
 
-        for (i = ELEMENTSOF(efi_subdirs); i > 0; i--) {
+        for (i = ELEMENTSOF(efi_subdirs)-1; i > 0; i--) {
                 q = rmdir_one(esp_path, efi_subdirs[i-1]);
                 if (q < 0 && r == 0)
                         r = q;