+ if (cmd && cmd->tty)
+ boot_task->boot_tty = talloc_strdup(boot_task, cmd->tty);
+ else {
+ config = config_get();
+ boot_task->boot_tty = config ? config->boot_tty : NULL;
+ }
+
+ /* start async loads for boot resources */
+ rc = start_url_load(boot_task, "kernel image", image, &boot_task->image)
+ || start_url_load(boot_task, "initrd", initrd, &boot_task->initrd)
+ || start_url_load(boot_task, "dtb", dtb, &boot_task->dtb);
+
+ if (rc) {
+ /* Don't call boot_cancel() to preserve the status update */
+ boot_task->cancelled = true;
+ cleanup_cancellations(boot_task, NULL);
+ return NULL;
+ }
+