Nikolai Artemiev has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
flashrom.c: do not delete programmer arguments
Make extract_param() leave parameters in tact rather than deleting them as they are retrieved. Deleting them is undesierable as makes the function more complex and requires that extract_programmer_param() does not get called for the same parameter multiple times, which can be difficult to gaurentee for some programmer initialization cases.
Change-Id: I9b1ec2d273c723fef8908e4ddf13b3079924f0a7 Signed-off-by: Nikolai Artemiev nartemiev@google.com --- M flashrom.c 1 file changed, 0 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/44562/1
diff --git a/flashrom.c b/flashrom.c index 4a30986..f3f0b46 100644 --- a/flashrom.c +++ b/flashrom.c @@ -750,11 +750,6 @@ } strncpy(opt, opt_pos, optlen); opt[optlen] = '\0'; - rest = opt_pos + optlen; - /* Skip all delimiters after the current parameter. */ - rest += strspn(rest, delim); - memmove(param_pos, rest, strlen(rest) + 1); - /* We could shrink haystack, but the effort is not worth it. */ }
return opt;
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/44562
to look at the new patch set (#2).
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
flashrom.c: do not delete programmer arguments
Make extract_param() leave parameters in tact rather than deleting them as they are retrieved. Deleting them is undesierable as makes the function more complex and requires that extract_programmer_param() does not get called for the same parameter multiple times, which can be difficult to gaurentee for some programmer initialization cases.
Change-Id: I9b1ec2d273c723fef8908e4ddf13b3079924f0a7 Signed-off-by: Nikolai Artemiev nartemiev@google.com --- M flashrom.c 1 file changed, 2 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/44562/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/44562
to look at the new patch set (#3).
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
flashrom.c: do not delete programmer arguments
Make extract_param() leave parameters in tact rather than deleting them as they are retrieved. Deleting them is undesierable as makes the function more complex and requires that extract_programmer_param() does not get called for the same parameter multiple times, which can be difficult to gaurentee for some programmer initialization cases.
Change-Id: I9b1ec2d273c723fef8908e4ddf13b3079924f0a7 Signed-off-by: Nikolai Artemiev nartemiev@google.com --- M flashrom.c 1 file changed, 3 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/44562/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 3: Code-Review+1
(3 comments)
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@9 PS3, Line 9: in tact We should also leave the word `intact` intact 😜
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@10 PS3, Line 10: undesierable undesirable
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@13 PS3, Line 13: gaurentee guarantee
Hello build bot (Jenkins), Nico Huber, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/44562
to look at the new patch set (#4).
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
flashrom.c: do not delete programmer arguments
Make extract_param() leave parameters intact rather than deleting them as they are retrieved. Deleting them is undesirable as makes the function more complex and requires that extract_programmer_param() does not get called for the same parameter multiple times, which can be difficult to guarantee for some programmer initialization cases.
Change-Id: I9b1ec2d273c723fef8908e4ddf13b3079924f0a7 Signed-off-by: Nikolai Artemiev nartemiev@google.com --- M flashrom.c 1 file changed, 3 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/44562/4
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@9 PS3, Line 9: in tact
We should also leave the word `intact` intact 😜
lol, done.
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@10 PS3, Line 10: undesierable
undesirable
Done
https://review.coreboot.org/c/flashrom/+/44562/3//COMMIT_MSG@13 PS3, Line 13: gaurentee
guarantee
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 4: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 4: Code-Review-1
I understand why it is unwanted for your case, but I don't understand why the code is suddenly not needed anymore.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 4: Code-Review+1
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Patch Set 4:
Patch Set 4: Code-Review-1
I understand why it is unwanted for your case, but I don't understand why the code is suddenly not needed anymore.
My bad here, I didn't realize that deleting parameters is necessary to allow unused parameters to be detected. I'll look into adapting our current code paths that call extract_param() multiple times.
Nikolai Artemiev has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/44562 )
Change subject: flashrom.c: do not delete programmer arguments ......................................................................
Abandoned
Change is not compatible with unused parameter detection.