Format partition table similar to debug component

This commit is contained in:
Mat931
2026-05-03 20:47:49 +02:00
parent 1895ef1c3e
commit c19d06a07f
@@ -113,12 +113,15 @@ void ESPHomeOTAComponent::dump_config() {
this->running_app_offset_, this->running_app_size_, this->running_app_size_);
#ifdef USE_ESP32
ESP_LOGCONFIG(TAG, " Partition table:");
esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, nullptr);
while (it != nullptr) {
const esp_partition_t *p = esp_partition_get(it);
ESP_LOGCONFIG(TAG, " %s: type=0x%X, subtype=0x%X, address=0x%X, size=0x%X", p->label, p->type, p->subtype,
p->address, p->size);
ESP_LOGCONFIG(TAG,
" Partition table:\n"
" %-12s %-4s %-8s %-10s %-10s",
"Name", "Type", "Subtype", "Address", "Size");
esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL);
while (it != NULL) {
const esp_partition_t *partition = esp_partition_get(it);
ESP_LOGCONFIG(TAG, " %-12s 0x%-2X 0x%-6X 0x%-8" PRIX32 " 0x%-8" PRIX32, partition->label, partition->type,
partition->subtype, partition->address, partition->size);
it = esp_partition_next(it);
}
esp_partition_iterator_release(it);