summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@intel.com>2013-01-04 15:41:08 +0200
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2013-01-10 14:13:17 +0200
commit542fee95676553bec1b77b835ac6d097fceaff40 (patch)
tree5d64f95da8efdb2f148af07ced6f703acee549c7 /plugins
parent86dcba02e8c49f8489d5d593d0f60d76ac95b4ea (diff)
downloadmic-542fee95676553bec1b77b835ac6d097fceaff40.tar.gz
mic-542fee95676553bec1b77b835ac6d097fceaff40.tar.bz2
mic-542fee95676553bec1b77b835ac6d097fceaff40.zip
partitionedfs: make the interface a bit saner
We have 'add_partition()' call to add one partion, but we have 'add_disks()' method to add all disks at once. This is inconsistent and makes the code more difficult to understand. Fix this by changind 'add_disks()' into 'add_disk()' which adds a single disk. This makes things look a lot nicer. Change-Id: I8a4f4249b1f8fa02486d4cbb3fbc4226ca2e65b8 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imager/liveusb_plugin.py2
-rw-r--r--plugins/imager/raw_plugin.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/imager/liveusb_plugin.py b/plugins/imager/liveusb_plugin.py
index 91d281c..73afa47 100644
--- a/plugins/imager/liveusb_plugin.py
+++ b/plugins/imager/liveusb_plugin.py
@@ -216,7 +216,7 @@ class LiveUSBPlugin(ImagerPlugin):
imgmnt = misc.mkdtemp()
disk = fs_related.SparseLoopbackDisk(img, imgsize)
imgloop = PartitionedMount(imgmnt, skipformat = True)
- imgloop.add_disks({'/dev/sdb':disk})
+ imgloop.add_disk('/dev/sdb', disk)
imgloop.add_partition(imgsize/1024/1024, "/dev/sdb", "/", "vfat", boot=False)
try:
imgloop.mount()
diff --git a/plugins/imager/raw_plugin.py b/plugins/imager/raw_plugin.py
index 8b7a3e5..c22e4ea 100644
--- a/plugins/imager/raw_plugin.py
+++ b/plugins/imager/raw_plugin.py
@@ -136,7 +136,7 @@ class RawPlugin(ImagerPlugin):
disk = fs_related.SparseLoopbackDisk(img, imgsize)
imgmnt = misc.mkdtemp()
imgloop = PartitionedMount(imgmnt, skipformat = True)
- imgloop.add_disks({'/dev/sdb':disk})
+ imgloop.add_disk('/dev/sdb', disk)
img_fstype = "ext3"
msger.info("Partition Table:")
@@ -246,7 +246,7 @@ class RawPlugin(ImagerPlugin):
disk = fs_related.SparseLoopbackDisk(srcimg, srcimgsize)
srcloop = PartitionedMount(srcmnt, skipformat = True)
- srcloop.add_disks({'/dev/sdb':disk})
+ srcloop.add_disk('/dev/sdb', disk)
srcloop.add_partition(srcimgsize/1024/1024, "/dev/sdb", "/", "ext3", boot=False)
try:
srcloop.mount()