summaryrefslogtreecommitdiffstats
path: root/scripts
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:20:48 +0100
commiteca8a56a4e41780a4b383cbca26478c2e90f8e81 (patch)
treeb4e89ac4289626cd1f3e4e708de8c217cd127fbb /scripts
parentd08c2ce0d67179cd3e37a23650c839c479d43750 (diff)
downloadpoky-eca8a56a4e41780a4b383cbca26478c2e90f8e81.tar.gz
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. (From OE-Core rev: 3231562c3c9f8173ddcc0812001aadf0988c8892) 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')
-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):
122 partition command parameters. 122 partition command parameters.
123 """ 123 """
124 if not self.source: 124 if not self.source:
125 if not self.size:
126 msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint)
125 if self.fstype and self.fstype == "swap": 127 if self.fstype and self.fstype == "swap":
126 self.prepare_swap_partition(cr_workdir, oe_builddir, 128 self.prepare_swap_partition(cr_workdir, oe_builddir,
127 native_sysroot) 129 native_sysroot)