]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: Error on parted non-zero error code
authorTom Zanussi <tom.zanussi@linux.intel.com>
Thu, 10 Jul 2014 18:25:14 +0000 (13:25 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Jul 2014 09:06:21 +0000 (10:06 +0100)
The current code uses msger.debug() to note errors, effectively
squelching them if --debug isn't used.  Apparently this is because it
can return non-zero for some loop device failures.  We don't care
about loop devices, and not paying attention to the error code
actually results in invalid images, so error out on parted failures as
we should be.

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>
scripts/lib/mic/utils/partitionedfs.py

index 6607466a83a7aedb5945640707a5d47caaa76929..593cf1f31740edfa97d7d33787510ca80cfa3de1 100644 (file)
@@ -272,7 +272,7 @@ class PartitionedMount(Mount):
             # parted always fails to reload part table with loop devices. This
             # prevents us from distinguishing real errors based on return
             # code.
-            msger.debug("WARNING: parted returned '%s' instead of 0" % rc)
+            msger.error("WARNING: parted returned '%s' instead of 0 (use --debug for details)" % rc)
 
     def __create_partition(self, device, parttype, fstype, start, size):
         """ Create a partition on an image described by the 'device' object. """