mirror of
https://github.com/bkerler/sboot_dump.git
synced 2024-11-14 11:24:56 -05:00
Fix device name display
This commit is contained in:
parent
06151c0737
commit
3923b27d6c
1 changed files with 9 additions and 4 deletions
13
samupload.py
13
samupload.py
|
@ -492,15 +492,20 @@ class partitiontable:
|
|||
self.mode = mode
|
||||
if mode == 64:
|
||||
self.ptype = sh.dword()
|
||||
self.pname = sh.bytes(12)
|
||||
self.pname = self.pname[:self.pname.find(b"\x00")].decode('utf-8')
|
||||
self.info = sh.qword()
|
||||
self.pname = sh.bytes(20)
|
||||
if b"\x00" in self.pname:
|
||||
self.pname = self.pname[:self.pname.find(b"\x00")].decode('utf-8')
|
||||
else:
|
||||
self.pname=self.pname.decode('utf-8')
|
||||
self.pstart = sh.qword()
|
||||
self.pend = sh.qword()
|
||||
elif mode == 32:
|
||||
self.ptype = sh.dword()
|
||||
self.pname = sh.bytes(16)
|
||||
self.pname = self.pname[:self.pname.find(b"\x00")].decode('utf-8')
|
||||
if b"\x00" in self.pname:
|
||||
self.pname = self.pname[:self.pname.find(b"\x00")].decode('utf-8')
|
||||
else:
|
||||
self.pname=self.pname.decode('utf-8')
|
||||
self.pstart = sh.dword()
|
||||
self.pend = sh.dword()
|
||||
|
||||
|
|
Loading…
Reference in a new issue