mirror of
https://git.yoctoproject.org/poky
synced 2026-02-13 12:13:02 +01:00
wic: ensure generated disk system identifier is non-zero
Zero may be interpreted as no MBR signature present and another partitioning program might install a new MBR signature. (From OE-Core rev: f53b5555d6eaa171bc5882cfee807cf62576862d) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3582f6fc01
commit
408c65613a
@@ -303,7 +303,7 @@ class PartitionedImage():
|
||||
# all partitions (in bytes)
|
||||
self.ptable_format = ptable_format # Partition table format
|
||||
# Disk system identifier
|
||||
self.identifier = int.from_bytes(os.urandom(4), 'little')
|
||||
self.identifier = int.from_bytes(os.urandom(4), 'little') or 0xffffffff
|
||||
|
||||
self.partitions = partitions
|
||||
self.partimages = []
|
||||
|
||||
Reference in New Issue
Block a user