summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-08 10:13:37 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-08 10:13:37 +0000
commit2b6dcb36c4121ed12fa2fb66f133365bd88f2456 (patch)
treebea24b22c91729fd1054a4d285bc8f051e5a8f3b /flashrom.c
parent7af6cefa482d4ceadbd9b68d6db12ad9759c8b04 (diff)
downloadflashrom-2b6dcb36c4121ed12fa2fb66f133365bd88f2456.tar.gz
flashrom-2b6dcb36c4121ed12fa2fb66f133365bd88f2456.tar.bz2
flashrom-2b6dcb36c4121ed12fa2fb66f133365bd88f2456.zip
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>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index db15ae540..fc781984e 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -89,7 +89,7 @@ enum programmer programmer =
;
#endif
-char *programmer_param = NULL;
+static char *programmer_param = NULL;
/* Supported buses for the current programmer. */
enum chipbustype buses_supported;
@@ -641,6 +641,11 @@ char *extract_param(char **haystack, char *needle, char *delim)
return opt;
}
+char *extract_programmer_param(char *param_name)
+{
+ return extract_param(&programmer_param, param_name, ",");
+}
+
/* start is an offset to the base address of the flash chip */
int check_erased_range(struct flashchip *flash, int start, int len)
{