5import isystem.connect
as ic
11def test_getPartitionInfo():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
16 partitionName =
"Boot1"
17 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EMMCDevice, devName, partitionName)
19 partInfo = storageCtrl.getPartitionConfigurationModule().getPartitionInfo()
21 print(f
"\tName: {partInfo.getName()}")
22 print(f
"\tType: {partInfo.getType()}")
23 print(f
"\tOffset: {partInfo.getOffset()}")
24 print(f
"\tSize: {partInfo.getSize()}")
25 print(f
"\tEnhanced offset: {partInfo.getEnhancedOffset()}")
26 print(f
"\tEnhanced size: {partInfo.getEnhancedSize()}")
27 print(f
"\tExtended status: {partInfo.getExtended()}")
28 print(f
"\tIs bootable: {partInfo.isBootable()}")
29 print(f
"\tCan modifyBoot: {partInfo.canModifyBoot()}")
30 print(f
"\tCan modify name: {partInfo.canModifyName()}")
31 print(f
"\tCan modify offset: {partInfo.canModifyOffset()}")
32 print(f
"\tCan modify size: {partInfo.canModifySize()}")
33 print(f
"\tCan remove: {partInfo.canRemove()}")
35 ic.CStorageDeviceFactory.terminateDevice(connMgr, 1, devName)
38if __name__ ==
"__main__":
39 test_getPartitionInfo()