Stefan Reinauer submitted this change.
Allow serial numbers beginning with EM
Newer em100s have serial numbers beginning with EM instead of DP.
Signed-off-by: Chris Koch <chrisko@google.com>
Change-Id: I6f4b3b0900fe1b5c776acd02f54ca97b31d85420
Reviewed-on: https://review.coreboot.org/c/em100/+/37624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ryan O'Leary <ryanoleary@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
---
M em100.c
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/em100.c b/em100.c
index 1ee22ec..46f2c64 100644
--- a/em100.c
+++ b/em100.c
@@ -878,8 +878,10 @@
firmware_is_dpfw = 1;
break;
case 'x':
- if ((optarg[0] == 'D' || optarg[0] == 'd') &&
- (optarg[1] == 'P' || optarg[1] == 'p'))
+ if (((optarg[0] == 'D' || optarg[0] == 'd') &&
+ (optarg[1] == 'P' || optarg[1] == 'p')) ||
+ ((optarg[0] == 'E' || optarg[0] == 'e') &&
+ (optarg[1] == 'M' || optarg[1] == 'm')))
sscanf(optarg + 2, "%d", &serial_number);
else
sscanf(optarg, "%d:%d", &bus, &device);
To view, visit change 37624. To unsubscribe, or for help writing mail filters, visit settings.