mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Unify programmer parameter extraction
Make programmer_param static by converting all users to extract_programmer_param. Programmer parameters can no longer be separated with a colon, they have to be separated with a comma. Corresponding to flashrom svn r1072. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
@ -306,7 +306,7 @@ int serprog_init(void)
|
||||
int have_device = 0;
|
||||
|
||||
/* the parameter is either of format "dev=/dev/device:baud" or "ip=ip:port" */
|
||||
device = extract_param(&programmer_param, "dev", ",");
|
||||
device = extract_programmer_param("dev");
|
||||
if (device && strlen(device)) {
|
||||
baudport = strstr(device, ":");
|
||||
if (baudport) {
|
||||
@ -333,7 +333,7 @@ int serprog_init(void)
|
||||
}
|
||||
free(device);
|
||||
|
||||
device = extract_param(&programmer_param, "ip", ",");
|
||||
device = extract_programmer_param("ip");
|
||||
if (have_device && device) {
|
||||
msg_perr("Error: Both host and device specified.\n"
|
||||
"Please use either dev= or ip= but not both.\n");
|
||||
|
Reference in New Issue
Block a user