]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: ubi.c: skip part command if right partition is already attached
authorAlexandre Besnard <alexandre.besnard@softathome.com>
Mon, 4 Apr 2022 15:50:14 +0000 (17:50 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 14 Apr 2022 19:39:15 +0000 (15:39 -0400)
commit5f4c33d0e0abd929d5eee98ba22c0a332b9d3457
treec914d2d611a32daea8075c4cdf9fef71f906186b
parentea638e483650fed6eb3bafe5c7ff1ec9952e0b64
cmd: ubi.c: skip part command if right partition is already attached

Attaching a UBI partition may take a while, since scanning the memory is
required.
It thus makes sense to avoid a detach/scan/attach cycle when the right
partition is already attached, and let the calling process call 'detach'
beforehand if it needs it.

This commit checks for the currently attached UBI partition, and skips
reattaching if not needed, showing an information.

Signed-off-by: Alexandre Besnard <alexandre.besnard@softathome.com>
cmd/ubi.c