+ for (filename = parser->filenames; *filename; filename++) {
+ int rc, len;
+ char *buf;
+
+ path = local_path(ctx, *filename);
+ if (!path)
+ continue;
+
+ rc = read_file(ctx, path, &buf, &len);
+ if (!rc) {
+ parser->parse(ctx, buf, len);
+ talloc_free(buf);
+ }
+ }
+}
+
+void iterate_parsers(struct discover_context *ctx)
+{
+ int i;
+
+ pb_log("trying parsers for %s\n", ctx->device->device->id);
+
+ for (i = 0; parsers[i]; i++) {
+ pb_log("\ttrying parser '%s'\n", parsers[i]->name);
+ iterate_parser_files(ctx, parsers[i]);
+ }