mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
Support setting the Dediprog SF100 SPI voltage
Add a generic voltage parameter parser. Move tolower_string() from dummyflasher.c to flashrom.c to make it available everywhere. Corresponding to flashrom svn r1226. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coreboot.org>
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#if HAVE_UTSNAME == 1
|
||||
#include <sys/utsname.h>
|
||||
@ -615,6 +616,12 @@ int bitcount(unsigned long a)
|
||||
return i;
|
||||
}
|
||||
|
||||
void tolower_string(char *str)
|
||||
{
|
||||
for (; *str != '\0'; str++)
|
||||
*str = (char)tolower((unsigned char)*str);
|
||||
}
|
||||
|
||||
char *strcat_realloc(char *dest, const char *src)
|
||||
{
|
||||
dest = realloc(dest, strlen(dest) + strlen(src) + 1);
|
||||
|
Reference in New Issue
Block a user