config: Add boot_device member to config
[petitboot] / lib / pb-config / pb-config.c
index ed84fec9e76d8dc4fc21859eebdeed8fa9cd3f8f..2adc7b248d8b956569ff971464cf6e2bc74092e4 100644 (file)
@@ -68,5 +68,10 @@ struct config *config_copy(void *ctx, const struct config *src)
                dest->boot_priorities[i].type = src->boot_priorities[i].type;
        }
 
+       if (src->boot_device && strlen(src->boot_device))
+               dest->boot_device = talloc_strdup(dest, src->boot_device);
+       else
+               dest->boot_device = NULL;
+
        return dest;
 }