On Tue, Jul 10, 2012 at 11:52 AM, Tommi Keisala wrote: > > Here is another try with fixes Tormod earlier suggested plus a change that > make Stellaris prefix extension happen with different options between adding > (-s address) and deleting (-T). >
Hi Tommi, While preparing to apply your patch, a few questions about the patch came up: > @@ -67,6 +80,8 @@ static struct option opts[] = { > { "did", 1, 0, 'd' }, > { "check", 1, 0, 'c' }, > { "add", 1, 0, 'a' }, >+ { "stellaris-add", 1, 0, 's' }, >+ { "stellaris", 0, 0, 'T' }, > }; > > static int check_suffix(struct dfu_file *file) { About the long option name for -s: Do you agree that "--stellaris-address" would be better? Since its argument is really an address, and the user still need to use the --add option as well. So the usage would be --add --stellaris-address XXXX image.file. I can fix that up myself, no need for resending the patch. + case 's': + lmdfu_mode = LMDFU_ADD; + lmdfu_flash_address = strtoul(optarg, NULL, 0); + if (strcmp(optarg, "default")) { + lmdfu_flash_address = strtoul(optarg, &end, 0); + if (!lmdfu_flash_address || (*end)) { This looks a bit strange to me, you are reading out lmdfu_flash_address twice. And does the "default" argument value, leaving lmdfu_flash_address zero, make any sense? Cheers, Tormod _______________________________________________ devel mailing list devel@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/devel