fsdump2saip: treat maxFileSize for BER-TLV

Change-Id: If699f94998bf3fba47231c19b794b0f473dfabf5
This commit is contained in:
Harald Welte
2024-09-01 21:16:27 +02:00
parent bc23a2cc7b
commit 3203f7d0ff

View File

@@ -92,8 +92,10 @@ class FsdumpToSaip:
spinfo = pinfo.child_by_type(SpecialFileInfo)
fill_p = pinfo.child_by_type(FillingPattern)
repeat_p = pinfo.child_by_type(RepeatPattern)
# only exists for BER-TLV files
max_fsize = pinfo.child_by_type(MaximumFileSize)
if spinfo or fill_p or repeat_p:
if spinfo or fill_p or repeat_p or max_fsize:
r['proprietaryEFInfo'] = {}
if spinfo:
r['proprietaryEFInfo']['specialFileInformation'] = spinfo.to_bytes()
@@ -101,6 +103,8 @@ class FsdumpToSaip:
r['proprietaryEFInfo']['fillPattern'] = fill_p.to_bytes()
if repeat_p:
r['proprietaryEFInfo']['repeatPattern'] = repeat_p.to_bytes()
if max_fsize:
r['proprietaryEFInfo']['maximumFileSize'] = max_fsize.to_bytes()
# TODO: linkPath
return r