Merge commit '8317e66433903badaec8ebd2b9ec2b8153f3d612' * commit '8317e66433903badaec8ebd2b9ec2b8153f3d612': make info_dict and GetTypeAndDevice available to device extensions
This commit is contained in:
@@ -765,3 +765,20 @@ def ComputeDifferences(diffs):
|
||||
th.start()
|
||||
while threads:
|
||||
threads.pop().join()
|
||||
|
||||
|
||||
# map recovery.fstab's fs_types to mount/format "partition types"
|
||||
PARTITION_TYPES = { "yaffs2": "MTD", "mtd": "MTD",
|
||||
"ext4": "EMMC", "emmc": "EMMC" }
|
||||
|
||||
def GetTypeAndDevice(mount_point, info):
|
||||
fstab = info["fstab"]
|
||||
if fstab:
|
||||
return PARTITION_TYPES[fstab[mount_point].fs_type], fstab[mount_point].device
|
||||
else:
|
||||
devices = {"/boot": "boot",
|
||||
"/recovery": "recovery",
|
||||
"/radio": "radio",
|
||||
"/data": "userdata",
|
||||
"/cache": "cache"}
|
||||
return info["partition_type"], info.get("partition_path", "") + devices[mount_point]
|
||||
|
Reference in New Issue
Block a user