diff options
author | Jonathan Liu <net147@gmail.com> | 2017-07-29 00:45:27 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:45:13 +0100 |
commit | f53b5555d6eaa171bc5882cfee807cf62576862d (patch) | |
tree | e1f32c106a8db192aeafcd62ee247ed1a63c9f57 /scripts | |
parent | 5002004b891895654cbad53555ee46e2ed188630 (diff) | |
download | openembedded-core-contrib-f53b5555d6eaa171bc5882cfee807cf62576862d.tar.gz |
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.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 0a65a9c58d6..51bdd3a9849 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -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 = [] |