partitionedfs: a preparation and nicification
Prepare for further changes and refactor the code a bit: separate the parted
running functionality to the '__run_parted()' function.
Do some nicifications in '__create_partition()' to improve readability.
Move the '__create_partition()' and '__run_parted()' functions down so that
they go just before 'format_disk()', which is more logical.
Remove a lot of redundant code by moving the error checking to
'__run_parted()'.
Change-Id: If9697cd2ede6f8b3f07289aa8e8ac391ea882cf2
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>