mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
Update patch.py
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
32ef5f3aeb
commit
2e7b31abf5
1 changed files with 1 additions and 1 deletions
2
patch.py
2
patch.py
|
|
@ -86,7 +86,7 @@ def patch_initrd_xz(initrd_xz:bytes,key_dict:dict,ljust=True):
|
|||
new_initrd = new_initrd.replace(old_public_key,new_public_key)
|
||||
preset = 6
|
||||
new_initrd_xz = lzma.compress(new_initrd,check=lzma.CHECK_CRC32,filters=[{"id": lzma.FILTER_LZMA2, "preset": preset }] )
|
||||
while len(new_initrd_xz) > len(initrd_xz) and preset < 10:
|
||||
while len(new_initrd_xz) > len(initrd_xz) and preset < 9:
|
||||
print(f'preset:{preset}')
|
||||
print(f'new initrd xz size:{len(new_initrd_xz)}')
|
||||
print(f'old initrd xz size:{len(initrd_xz)}')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue