ef_verify: Fix test for undumpable tables
Virtual selectors can't be used in xundump, since we lack a setter to
go with ca_get(). verify_ca() verifies they don't occur in tables
that can be xundumped.
When I restricted xundump to tables with a file name (commit 029d929
,
v4.3.28), I neglected to update the test in verify_ca().
Factor out the correct test into xundumpable(). Use it to fix
verify_ca().
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
bb0f3a656e
commit
18b5d16248
3 changed files with 16 additions and 6 deletions
|
@ -1155,8 +1155,7 @@ xuheader(FILE *fp, int expected_table)
|
|||
return gripe("expected table '%s', not '%s'",
|
||||
ef_nameof(expected_table), name);
|
||||
|
||||
if (!empfile[type].file
|
||||
|| !ef_cadef(type) || !(ef_flags(type) & EFF_MEM)) {
|
||||
if (!xundumpable(type)) {
|
||||
CANT_HAPPEN(expected_table != EF_BAD);
|
||||
return gripe("table '%s' is not permitted here", name);
|
||||
}
|
||||
|
@ -1168,6 +1167,16 @@ xuheader(FILE *fp, int expected_table)
|
|||
return type;
|
||||
}
|
||||
|
||||
/*
|
||||
* Can table @type be xundumped?
|
||||
*/
|
||||
int
|
||||
xundumpable(int type)
|
||||
{
|
||||
return empfile[type].file && ef_cadef(type)
|
||||
&& (ef_flags(type) & EFF_MEM);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find fields in this xdump.
|
||||
* If reading human-readable syntax, read a field header line from @fp.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue