util/sconfig: Report which key is duplicate

It slightly helps debugging issues when you know what to look out for.

Change-Id: I21eafaf8291701316aa920e458ba74535121b0a1
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Georgi 2020-11-02 18:08:14 +01:00
parent 50526d5a30
commit 5193312e1e
1 changed files with 1 additions and 1 deletions

View File

@ -872,7 +872,7 @@ static void add_reg(struct reg **const head, char *const name, char *const val)
for (cur = *head; cur != NULL; prev = cur, cur = cur->next) {
const int sort = strcmp(r->key, cur->key);
if (sort == 0) {
printf("ERROR: duplicate 'register' key.\n");
printf("ERROR: duplicate 'register' key '%s'.\n", r->key);
exit(1);
}
if (sort < 0)