obmc-flash-bmc: Fixes to the logic to delete volumes

- The current logic was preventing deleting the volume based on the
kernelname environment variable, but this variable changes during a
code update, and doesn't reflect the current running version. Change
that to create the kernelname based on the current running version
since it prevents users from doing back-to-back updates with no BMC
reboot in between.
- Check the mtd of the volume to be deleted against the currently
running mtd, because the version name may be the same. This is the
case when the 2 chips have the same version as when the come out of
manufacturing.
- Enhance the remove function to accept an mtd parameter, so that it
deletes the volume on the specified mtd instead of the first one that
it finds. This is to support duplicate version as well.
- Clear the priority env variable when a volume is deleted as part
of the cleanup.

Change-Id: I5725bb71ac2b75abaf3e2b365fbd18f116651c7b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
1 file changed
tree: 3e6ba8b34595c73cab9240aa86a152a0752a968e
  1. classes/
  2. common/
  3. conf/
  4. COPYING.apache-2.0
  5. COPYING.MIT
  6. LICENSE