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_); this->running_app_offset_, this->running_app_size_, this->running_app_size_);
#ifdef USE_ESP32 #ifdef USE_ESP32
ESP_LOGCONFIG(TAG, " Partition table:"); ESP_LOGCONFIG(TAG,
esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, nullptr); " Partition table:\n"
while (it != nullptr) { " %-12s %-4s %-8s %-10s %-10s",
const esp_partition_t *p = esp_partition_get(it); "Name", "Type", "Subtype", "Address", "Size");
ESP_LOGCONFIG(TAG, " %s: type=0x%X, subtype=0x%X, address=0x%X, size=0x%X", p->label, p->type, p->subtype, esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL);
p->address, p->size); 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); it = esp_partition_next(it);
} }
esp_partition_iterator_release(it); esp_partition_iterator_release(it);