summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-26 11:06:45 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2010-07-26 11:06:45 -0700
commitcacca7df569e396d76112693aab62c95d51ff035 (patch)
treeb5c5a35bc3f6155f2ab768ae1475964c4e24c2ac /nova/compute
parent35fda702abf91792d3c4753a1bbccdb119eaf6eb (diff)
parent340f9fc8d63ec931485aba1dcfeccdc1cb3849fa (diff)
merged trunk
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/disk.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/compute/disk.py b/nova/compute/disk.py
index 08a22556e..1ffcca685 100644
--- a/nova/compute/disk.py
+++ b/nova/compute/disk.py
@@ -40,7 +40,8 @@ def partition(infile, outfile, local_bytes=0, local_type='ext2', execute=None):
formatted as ext2.
In the diagram below, dashes represent drive sectors.
- 0 a b c d e
+ +-----+------. . .-------+------. . .------+
+ | 0 a| b c|d e|
+-----+------. . .-------+------. . .------+
| mbr | primary partiton | local partition |
+-----+------. . .-------+------. . .------+
@@ -64,8 +65,8 @@ def partition(infile, outfile, local_bytes=0, local_type='ext2', execute=None):
last_sector = local_last # e
# create an empty file
- execute('dd if=/dev/zero of=%s count=1 seek=%d bs=%d'
- % (outfile, last_sector, sector_size))
+ yield execute('dd if=/dev/zero of=%s count=1 seek=%d bs=%d'
+ % (outfile, last_sector, sector_size))
# make mbr partition
yield execute('parted --script %s mklabel msdos' % outfile)