summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-04 09:11:35 -0500
committerTom Rini <trini@konsulko.com>2021-01-04 09:11:35 -0500
commit2e57549a9c34200358d26366f494c3bdcfdea93c (patch)
tree7a284f3e0381db0a431b74b2418b797375431026 /cmd
parent21e1cae7902e6a9b1d7cf47cf4764e6fe7d3452a (diff)
parentacff02c6dd05740ba5fbfaa6e2dd87c01b5c3257 (diff)
downloadu-boot-2e57549a9c34200358d26366f494c3bdcfdea93c.tar.gz
u-boot-2e57549a9c34200358d26366f494c3bdcfdea93c.tar.xz
u-boot-2e57549a9c34200358d26366f494c3bdcfdea93c.zip
Merge branch '2021-01-04-minor-fixes'
- Assorted fixes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ubi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 171377cc66..cb14e3e1e7 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -264,6 +264,11 @@ static int ubi_rename_vol(char *oldname, char *newname)
return ENODEV;
}
+ if (!ubi_check(newname)) {
+ printf("%s: volume %s already exist\n", __func__, newname);
+ return EINVAL;
+ }
+
printf("Rename UBI volume %s to %s\n", oldname, newname);
if (ubi->ro_mode) {