From aca27c8db23a3afb4e65de0f8e38e6b17f2262d4 Mon Sep 17 00:00:00 2001 From: "harshal.patil" Date: Tue, 13 Sep 2022 14:07:14 +0530 Subject: [PATCH] parttool: fix extra_partition_subtypes attribute parsing --- components/partition_table/gen_extra_subtypes_inc.py | 2 +- components/partition_table/parttool.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/partition_table/gen_extra_subtypes_inc.py b/components/partition_table/gen_extra_subtypes_inc.py index 1bc62734fb..45e4751a47 100755 --- a/components/partition_table/gen_extra_subtypes_inc.py +++ b/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: diff --git a/components/partition_table/parttool.py b/components/partition_table/parttool.py index 847d4bc0a9..3c30d850cc 100755 --- a/components/partition_table/parttool.py +++ b/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