1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

Add str extension to extract_programmer_param function name

This patch changes the function name of extract_programmer_param() to
extract_programmer_param_str() as this function name will clearly
specify that it returns the value of the given parameter as a string.

Signed-off-by: Chinmay Lonkar <chinmay20220@gmail.com>
Change-Id: Id7b9fff4d3e1de22abd31b8123a1d237cd0f5c97
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:
Chinmay Lonkar
2022-06-28 21:44:04 +05:30
committed by Thomas Heijligen
parent f0fae1a9a5
commit 1bb5ddde60
31 changed files with 81 additions and 81 deletions

View File

@ -335,7 +335,7 @@ static int ft2232_spi_init(void)
struct ftdi_context ftdic;
struct ft2232_data *spi_data;
arg = extract_programmer_param("type");
arg = extract_programmer_param_str("type");
if (arg) {
if (!strcasecmp(arg, "2232H")) {
ft2232_type = FTDI_FT2232H_PID;
@ -431,7 +431,7 @@ static int ft2232_spi_init(void)
/* Remember reserved pins before pindir gets modified. */
const uint8_t rsv_bits = pindir & 0xf0;
arg = extract_programmer_param("port");
arg = extract_programmer_param_str("port");
if (arg) {
switch (toupper((unsigned char)*arg)) {
case 'A':
@ -464,7 +464,7 @@ static int ft2232_spi_init(void)
}
free(arg);
arg = extract_programmer_param("divisor");
arg = extract_programmer_param_str("divisor");
if (arg && strlen(arg)) {
unsigned int temp = 0;
char *endptr;
@ -480,7 +480,7 @@ static int ft2232_spi_init(void)
free(arg);
bool csgpiol_set = false;
arg = extract_programmer_param("csgpiol");
arg = extract_programmer_param_str("csgpiol");
if (arg) {
csgpiol_set = true;
msg_pwarn("Deprecation warning: `csgpiol` is deprecated and will be removed "
@ -513,7 +513,7 @@ static int ft2232_spi_init(void)
for (int pin = 0; pin < 4; pin++) {
char gpiol_param[7];
snprintf(gpiol_param, sizeof(gpiol_param), "gpiol%d", pin);
arg = extract_programmer_param(gpiol_param);
arg = extract_programmer_param_str(gpiol_param);
if (!arg)
continue;
@ -586,8 +586,8 @@ format_error:
msg_perr("Unable to select channel (%s).\n", ftdi_get_error_string(&ftdic));
}
arg = extract_programmer_param("serial");
arg2 = extract_programmer_param("description");
arg = extract_programmer_param_str("serial");
arg2 = extract_programmer_param_str("description");
f = ftdi_usb_open_desc(&ftdic, ft2232_vid, ft2232_type, arg2, arg);