summaryrefslogtreecommitdiff
path: root/scripts/lib/mic
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-07-15 10:33:15 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-16 10:06:54 +0100
commit3231562c3c9f8173ddcc0812001aadf0988c8892 (patch)
treeb8a6c5d0240f00d463257bd436e1d1102b3afc53 /scripts/lib/mic
parent136137ec1c124aee89d2120abded60a5cf0562b0 (diff)
downloadopenembedded-core-3231562c3c9f8173ddcc0812001aadf0988c8892.tar.gz
openembedded-core-3231562c3c9f8173ddcc0812001aadf0988c8892.tar.bz2
openembedded-core-3231562c3c9f8173ddcc0812001aadf0988c8892.zip
wic: Error on zero-sized partitions
It doesn't make sense to create zero-sized partitions so assume user error and notify the user they should be using a non-zero --size for partitions that don't specify a --source. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic')
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/partition.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 4662bdd75c..06f29a9885 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -122,6 +122,8 @@ class Wic_PartData(Mic_PartData):
partition command parameters.
"""
if not self.source:
+ if not self.size:
+ msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint)
if self.fstype and self.fstype == "swap":
self.prepare_swap_partition(cr_workdir, oe_builddir,
native_sysroot)