Commit Graph

58 Commits

Author SHA1 Message Date
Michael Marineau
8ca62121d9 feat(disk_util): Add mount and unmount commands.
This will replace the assorted mix of mount/umount scripts.
2013-12-30 16:12:04 -08:00
Michael Marineau
ba45152b4b feat(disk_util): Add 'format' command to create filesystems in an image.
This will replace the less flexible code in base_image_util.sh
2013-12-30 16:12:04 -08:00
Michael Marineau
ab23353448 fix(disk_util): Rework config parsing.
Merge GetPartitionTable and partition alignment from WritePartitionTable
into LoadPartitionConfig so that all this config manipulation code is in
one place and inheritance from the 'base' layout is more predictable.
2013-12-30 16:12:04 -08:00
Michael Marineau
0f4b52134a fix(disk_util): Convert partition list to an object.
Hey, 'num' is a primary key! Lets use it and avoid pointless looping.
2013-12-30 16:12:04 -08:00
Michael Marineau
576c8996f4 fix(disk_util): Remove support for --adjust_part
This isn't a feature we've been using as far as I know and if someone
needs a custom partition layout it's probably better to just add it to
the json file. Removing this avoids some complexity.
2013-12-30 16:12:02 -08:00
Michael Marineau
cc341f856b fix(disk_util): Merge write_mbr into write_gpt
No need for this to be a different command.
2013-12-30 16:10:46 -08:00
Michael Marineau
de9ff4fc8e fix(disk_util): Rework how argument parsing/passing works.
Move from optparse to argparse. Move layout file and layout type to
global options with reasonable default values so every command doesn't
need to them. Adjust calling scripts to match.

For now layout type is being passed via an environment variable
DISK_LAYOUT_TYPE but this is a temporary situation.
2013-12-30 16:10:46 -08:00
Michael Marineau
fdefbf704c add(disk_util): Rename cgpt.py to disk_util.
Use a more generic name so cgpt.py and disk_layout_util.sh can be merged
into one tool. Wrappers around wrappers around wrappers are tedious.
2013-12-30 16:10:46 -08:00