]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
ui/ncurses: Fix boot editor segfault on update
[petitboot] / discover / device-handler.c
index 82230154ba77d9a314f50d3a41fe184837197d40..a6eb8843d514e0a99f9a53bb79ea951e8ec6f36a 100644 (file)
@@ -1,4 +1,5 @@
 #include <assert.h>
+#include <inttypes.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -653,7 +654,7 @@ void device_handler_status_download(struct device_handler *handler,
                        unit++;
                }
                update = talloc_asprintf(handler,
-                               _("%u %s downloading: %.0f%% - %lu%cB"),
+                               _("%u %s downloading: %.0f%% - %" PRIu64 "%cB"),
                                handler->n_progress,
                                ngettext("item", "items", handler->n_progress),
                                (current / total) * 100, current_converted,
@@ -831,6 +832,9 @@ static enum default_priority default_option_priority(
                int boot_match = autoboot_option_priority(config, opt);
                if (boot_match > 0)
                        return boot_match;
+       } else {
+               /* If there is no specific boot order, boot any device */
+               return DEFAULT_PRIORITY_LOCAL_FIRST;
        }
 
        /* If the option didn't match any entry in the array, it is disabled */