Kaynağa Gözat

parttool: fix extra_partition_subtypes attribute parsing

harshal.patil 3 yıl önce
ebeveyn
işleme
aca27c8db2

+ 1 - 1
components/partition_table/gen_extra_subtypes_inc.py

@@ -14,7 +14,7 @@ def gen_header_file(path: str, subtypes: str) -> None:
             f.write('/*\n\t' + PARTTOOL_USAGE + '\n\t')
             f.write('--extra-partition-subtypes ')
             for line_no in subtypes:
-                f.write(line_no + ' ')
+                f.write(f'"{line_no}" ')
             f.write('\n*/\n\n')
         f.write('#pragma once\n\n')
         for line_no in subtypes:

+ 1 - 1
components/partition_table/parttool.py

@@ -252,6 +252,7 @@ def main():
                                            using the same fallback logic as the IDF bootloader', action='store_true')
 
     partition_selection_parser.add_argument('--partition-subtype', '-s', help='subtype of the partition')
+    partition_selection_parser.add_argument('--extra-partition-subtypes', help='Extra partition subtype entries', nargs='*')
 
     subparsers = parser.add_subparsers(dest='operation', help='run parttool -h for additional help')
 
@@ -270,7 +271,6 @@ def main():
     print_partition_info_subparser.add_argument('--info', help='type of partition information to get',
                                                 choices=['name', 'type', 'subtype', 'offset', 'size', 'encrypted'], default=['offset', 'size'], nargs='+')
     print_partition_info_subparser.add_argument('--part_list', help='Get a list of partitions suitable for a given type', action='store_true')
-    print_partition_info_subparser.add_argument('--extra-partition-subtypes', help='Extra partition subtype entries', nargs='*')
 
     args = parser.parse_args()
     quiet = args.quiet