1
0
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:
Carl-Daniel Hailfinger
2010-11-09 22:00:31 +00:00
parent 12d6d82141
commit c24413879c
5 changed files with 100 additions and 24 deletions

View File

@ -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);