diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2011-12-16 07:49:40 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2011-12-17 04:57:42 +0000 |
commit | 35791fdcabffd3c7043569f8442bbe4b03f0552b (patch) | |
tree | 4ae7426bc30d5864f0ee1811bc7988fd78189442 | |
parent | 35a0e96a0a13cd966bf2ed7a475e293c2814aef2 (diff) | |
download | cis-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) |