Attention is currently required from: Maximilian Brune, Angel Pons.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68160 )
Change subject: util/cbfstool: Add a new mechanism to provide a memory mapped ......................................................................
Patch Set 3:
(2 comments)
File util/cbfstool/cbfstool.c:
https://review.coreboot.org/c/coreboot/+/68160/comment/5d7369d9_0fb052ae PS1, Line 313: // Should be enough for now
Please be consistent with the existing C-style comments.
Done
https://review.coreboot.org/c/coreboot/+/68160/comment/75b1b170_468762c4 PS1, Line 335: static int decode_mmap_arg(char *optarg) : { : if (optarg == NULL) : return 1; : : unsigned long flash_base; : unsigned long mmap_base; : unsigned long region_size; : char *suffix = NULL; : char *substring = strtok(optarg, ":"); : if (substring) : flash_base = strtol(substring, &suffix, 0); : if (!substring || (suffix && *suffix)) { : ERROR("Invalid flash base address '%s'.\n", : optarg); : return 1; : } : substring = strtok(NULL, ":"); : if (substring) : mmap_base = strtol(substring, &suffix, 0); : if (!substring || (suffix && *suffix)) { : ERROR("Invalid mmap base address '%s'.\n", : optarg); : return 1; : } : substring = strtok(NULL, ":"); : if (substring) : region_size = strtol(substring, &suffix, 0); : if (!substring || (suffix && *suffix)) { : ERROR("Invalid flash region size '%s'.\n", : optarg); : return 1; : } : : if (strtok(NULL, ":") != NULL) { : ERROR("Invalid argument, too many substrings '%s'.\n", : optarg); : : return 1; : } : : add_mmap_window(flash_base, mmap_base, region_size); : return 0;
In this case it doesn't seem like a helper function would actually reduce any code here. […]
Done