summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThierry Carré2013-01-25 10:44:04 +0100
committerThierry Carré2013-01-25 11:38:24 +0100
commit819365f32adee29f146e13387f17b686fd3f9150 (patch)
tree4752688698de96fda73dd404fffcfea8f1a66466 /common
parent2db6fd1de98cb0cb4b8ef4f32661dc0615aa70cb (diff)
common/tools/genNVRAM: add a message for unrecognized option in conf file, closes #3678
Diffstat (limited to 'common')
-rw-r--r--common/tools/genNVRAM/genNVRAM.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/tools/genNVRAM/genNVRAM.c b/common/tools/genNVRAM/genNVRAM.c
index f8cd3dc692..e6270f9c94 100644
--- a/common/tools/genNVRAM/genNVRAM.c
+++ b/common/tools/genNVRAM/genNVRAM.c
@@ -895,6 +895,7 @@ static int parse_stdin()
while( fgets(line, sizeof(line), stdin) != NULL )
{
+ bool found = false;
parg = line;
/* Separate fields */
@@ -907,6 +908,7 @@ static int parse_stdin()
{
if( !strncasecmp(parse_table[i].label, chop(plabel), sizeof(line)) )
{
+ found = true;
if (nvram_type & parse_table[i].arch)
{
if (parse_table[i].func (chop (parg)) < 0)
@@ -921,6 +923,13 @@ static int parse_stdin()
}
}
}
+
+ if (!found)
+ {
+ fprintf (stderr,
+ "unrecognized option '%s' in config file\n", plabel);
+ return -1;
+ }
}
return 0;
}