- snprintf(filename, NAME_SIZE, "%s/%s", udev_db_path, ent->d_name);
- filename[NAME_SIZE-1] = '\0';
+ snprintf(filename, sizeof(filename), "%s/%s", udev_db_path, ent->d_name);
+ filename[sizeof(filename)-1] = '\0';
+ dbg("looking at '%s'", filename);
+
+ if (file_map(filename, &buf, &bufsize) != 0) {
+ err("unable to read db file '%s'", filename);
+ continue;
+ }