Message ID | 20210526120826.8045-9-marek.behun@nic.cz |
---|---|
State | Accepted |
Commit | 0b6f907d1543f1670460a797d62f49231b92ca98 |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | Support SPI NORs and OF partitions in `mtd list` | expand |
diff --git a/cmd/mtd.c b/cmd/mtd.c index 485a963bdd..2aabfd4d29 100644 --- a/cmd/mtd.c +++ b/cmd/mtd.c @@ -126,6 +126,13 @@ static void mtd_show_device(struct mtd_info *mtd) printf(" - driver: %s\n", mtd->dev->driver->name); } #endif + if (IS_ENABLED(CONFIG_OF_CONTROL) && mtd->dev) { + char buf[256]; + int res; + + res = ofnode_get_path(mtd_get_ofnode(mtd), buf, 256); + printf(" - path: %s\n", res == 0 ? buf : "unavailable"); + } /* MTD device information */ printf(" - type: ");