@@ -151,8 +151,7 @@ def parse_disk_entry(disk_entry):
151151 print (str (e ))
152152 usage ()
153153
154- def generate_ptool_xml (disk_params , partition_entries_dict , output_xml ):
155- print ("Generating ptool XML %s" % (output_xml ))
154+ def generate_single_disk_xml (disk_params , partition_entries_dict , output_xml ):
156155 root = ET .Element ("configuration" )
157156 parser_instruction_text = ""
158157
@@ -174,8 +173,7 @@ def generate_ptool_xml (disk_params, partition_entries_dict, output_xml):
174173 with open (output_xml , "w" ) as f :
175174 f .write (xmlstr )
176175
177- def generate_ufs_xml (disk_params , partition_entries_dict , output_xml ):
178- print ("Generating UFS XML %s" % (output_xml ))
176+ def generate_multi_lun_xml (disk_params , partition_entries_dict , output_xml ):
179177 root = ET .Element ("configuration" )
180178 parser_instruction_text = ""
181179
@@ -206,18 +204,15 @@ def generate_ufs_xml (disk_params, partition_entries_dict, output_xml):
206204 with open (output_xml , "w" ) as f :
207205 f .write (xmlstr )
208206
209-
210- def generate_nand_mbn_gen_xml (disk_params , partition_entry ):
211- print ("Generating nand_mbn_gen XML" )
212-
213207def generate_partition_xml (disk_entry , partition_entries_dict , output_xml ):
214208 parse_disk_entry (disk_entry )
209+ print ("Generating %s XML %s" % (disk_params ["type" ].upper (), output_xml ))
215210 if disk_params ["type" ] == "emmc" :
216- generate_ptool_xml (disk_params , partition_entries_dict , output_xml )
217- elif disk_params ["type" ] == "nand" :
218- generate_nand_mbn_gen_xml (disk_params , partition_entries_dict , output_xml )
211+ generate_single_disk_xml (disk_params , partition_entries_dict , output_xml )
219212 elif disk_params ["type" ] == "ufs" :
220- generate_ufs_xml (disk_params , partition_entries_dict , output_xml )
213+ generate_multi_lun_xml (disk_params , partition_entries_dict , output_xml )
214+ else :
215+ print ("%s XML generation is curently not supported." % (disk_params ["type" ].upper ()))
221216
222217###############################################################################
223218# main
0 commit comments