ukify: fix padding length
This commit is contained in:
committed by
Luca Boccassi
parent
9ecf865433
commit
c126c8ac81
+2
-1
@@ -441,7 +441,8 @@ def join_initrds(initrds):
|
||||
seq = []
|
||||
for file in initrds:
|
||||
initrd = file.read_bytes()
|
||||
padding = b'\0' * round_up(len(initrd), 4) # pad to 32 bit alignment
|
||||
n = len(initrd)
|
||||
padding = b'\0' * (round_up(n, 4) - n) # pad to 32 bit alignment
|
||||
seq += [initrd, padding]
|
||||
|
||||
return b''.join(seq)
|
||||
|
||||
Reference in New Issue
Block a user