]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: Fix error message when reporting invalid offset
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 12 Jun 2020 21:50:16 +0000 (16:50 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Jun 2020 14:20:01 +0000 (15:20 +0100)
The error message was reporting the calculated offset instead of the
current offset, which made it confusing.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/imager/direct.py

index 1f65a7afe568d48486550f25c0a8a297aa080665..2f019994053acf05b6f7d8ecead92c62d76261f2 100644 (file)
@@ -436,7 +436,7 @@ class PartitionedImage():
 
                 delta = offset - self.offset
                 if delta < 0:
-                    raise WicError("Could not place %s%s at offset %dK: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, offset, delta))
+                    raise WicError("Could not place %s%s at offset %dK: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, self.offset, delta))
 
                 logger.debug("Skipping %d sectors to place %s%s at offset %dK",
                              delta, part.disk, self.numpart, part.offset)