discover: check config.boot_device before setting a default
[petitboot] / lib / pb-protocol / pb-protocol.c
index 4a5c75a32437b1e4bd201eba7d5a760288ad55ad..67e1f9e91a04dbf52e3ffebecc0a2371feca35a4 100644 (file)
@@ -281,6 +281,8 @@ int pb_protocol_config_len(const struct config *config)
        len += 4;
        len += config->n_boot_priorities * 8;
 
+       len += 4 + optional_strlen(config->boot_device);
+
        return len;
 }