[OE-core] [PATCH] wic: Fix rootfs_size variable not found error.

Philip Balister philip at balister.org
Fri Nov 11 17:52:13 UTC 2016


Commit 1ba6101ceaee354816e690d44bc9a5dd8dcf4011 introduced the runtime
error. Thi scommit should fix it. Tested with an sd card build with
an ext4 file system.

Signed-off-by: Philip Balister <philip at balister.org>
---
 scripts/lib/wic/partition.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 89c33ab..dc85b42 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -308,7 +308,7 @@ class Partition():
         Prepare an empty ext2/3/4 partition.
         """
         with open(rootfs, 'w') as sparse:
-            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+            os.ftruncate(sparse.fileno(), self.size * 1024)
 
         extra_imagecmd = "-i 8192"
 
@@ -326,7 +326,7 @@ class Partition():
         Prepare an empty btrfs partition.
         """
         with open(rootfs, 'w') as sparse:
-            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+            os.ftruncate(sparse.fileno(), self.size * 1024)
 
         label_str = ""
         if self.label:
-- 
2.7.4




More information about the Openembedded-core mailing list