See code comment above the changed line. The current behavior
is intended. The code could always be extended, though, e.g. we
could issue a warning or bail ot if multiple devices match the
serial prefix?

Ah, next time I will read not just code. I discovered this behaviour while tested the STLink V3 and found it strange.

Which solution would you prefer?

Bailing out if there are multiple matches, I guess. Though, that's
probably hardest to implement.

View Change

To view, visit change 34641. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ife8c4e0a957c4345e27ec9ae9e1480ca80fe505c
Gerrit-Change-Number: 34641
Gerrit-PatchSet: 2
Gerrit-Owner: Miklós Márton <martonmiklosqdev@gmail.com>
Gerrit-Reviewer: Miklós Márton <martonmiklosqdev@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Sat, 03 Aug 2019 18:53:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment