Include name of unknown tag in the error message when parsig a formar string

Resolves: rhbz#855305
This commit is contained in:
Florian Festi 2015-11-13 12:20:24 +01:00
parent a8accc3d72
commit 73674678b2
2 changed files with 5 additions and 2 deletions

View File

@ -390,7 +390,10 @@ static int parseFormat(headerSprintfArgs hsa, char * str,
token->type = PTOK_TAG; token->type = PTOK_TAG;
if (findTag(hsa, token, start)) { if (findTag(hsa, token, start)) {
hsa->errmsg = _("unknown tag"); /* Use static buffer as hsa->errmsg is const char * */
static char errmsg[1024];
snprintf(errmsg, 1024, _("unknown tag: \"%s\""), start);
hsa->errmsg = (const char *)(&errmsg);
goto errxit; goto errxit;
} }

View File

@ -369,7 +369,7 @@ runroot rpm \
], ],
[0], [0],
[], [],
[error: incorrect format: unknown tag [error: incorrect format: unknown tag: "notag"
]) ])
AT_CLEANUP AT_CLEANUP