Skip to content

Commit

Permalink
Return file system that sits on top of UBI instead of simply UBI
Browse files Browse the repository at this point in the history
  • Loading branch information
AT0myks committed Jul 17, 2023
1 parent 34bce78 commit 3530887
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reolinkfw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def get_fs_info(pak: PAK, fs_sections: list[Section]) -> list[dict[str, str]]:
for section in fs_sections:
pak._fd.seek(section.start)
fs = FileType.from_magic(pak._fd.read(4))
if fs == FileType.UBI:
pak._fd.seek(section.start + 266240)
fs = FileType.from_magic(pak._fd.read(4))
result.append({
"name": section.name,
"type": fs.name.lower() if fs is not None else "unknown"
Expand Down

0 comments on commit 3530887

Please sign in to comment.