- const char * const *filename;
- const char *path;
-
- if (!parser->filenames)
- return;
-
- 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) {
- pb_log("Running parser %s on file %s\n",
- parser->name, *filename);
- parser->parse(ctx, buf, len);
- talloc_free(buf);
- }
+ int rc = -1;
+ char *full_path;
+
+ /* we only support local files at present */
+ if (!dev->mount_path)
+ return -1;
+
+ full_path = local_path(ctx, dev, path);
+
+ rc = stat(full_path, statbuf);
+ if (rc) {
+ rc = -1;
+ goto out;