From: Tom Zanussi Date: Tue, 15 Jul 2014 15:33:15 +0000 (-0500) Subject: wic: Error on zero-sized partitions X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~33197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3231562c3c9f8173ddcc0812001aadf0988c8892;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py index 4662bdd75c0..06f29a98858 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)