aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-12-16 07:49:40 +0000
committerBen Hutchings <ben@decadent.org.uk>2011-12-17 04:57:42 +0000
commit35791fdcabffd3c7043569f8442bbe4b03f0552b (patch)
tree4ae7426bc30d5864f0ee1811bc7988fd78189442
parent35a0e96a0a13cd966bf2ed7a475e293c2814aef2 (diff)
downloadcis-tools-35791fdcabffd3c7043569f8442bbe4b03f0552b.tar.gz
dump_cis: Ignore CISTPL_END in a CIS tuple file
This tuple marks the end of tuples for a function, not the entire device. Don't pass it to parse_tuple() (which doesn't like it) and don't stop parsing either.
-rw-r--r--dump_cis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dump_cis.c b/dump_cis.c
index 5c8fa0b..ec0ecb1 100644
--- a/dump_cis.c
+++ b/dump_cis.c
@@ -980,13 +980,13 @@ int main(int argc, char *argv[])
for (first = 1; ; first = 0) {
if (get_tuple_buf(fd, &arg, first) != 0) break;
if (verbose) print_tuple(&arg.tuple_parse);
+ if (arg.tuple.TupleCode == CISTPL_END)
+ continue;
if (parse_tuple(&arg.tuple_parse.tuple, &arg.tuple_parse.parse) == 0)
print_parse(&arg.tuple_parse);
else
printf("%sparse error\n", indent);
if (verbose) putchar('\n');
- if (arg.tuple.TupleCode == CISTPL_END)
- break;
}
if (!verbose && (nfn > 0))