create_path(filename);
f = fopen(filename, "w");
if (f == NULL) {
- err("unable to create db file '%s'", filename);
+ err("unable to create db file '%s': %s", filename, strerror(errno));
return -1;
}
dbg("storing data for device '%s' in '%s'", udev->devpath, filename);
devpath_to_db_path(devpath, filename, sizeof(filename));
if (file_map(filename, &buf, &bufsize) != 0) {
- dbg("no db file to read '%s'", filename);
+ info("no db file to read %s: %s", filename, strerror(errno));
return -1;
}
dir = opendir(udev_db_path);
if (dir == NULL) {
- err("unable to open udev_db '%s'", udev_db_path);
+ err("unable to open udev_db '%s': %s", udev_db_path, strerror(errno));
return -1;
}
dbg("looking at '%s'", filename);
if (file_map(filename, &buf, &bufsize) != 0) {
- err("unable to read db file '%s'", filename);
+ err("unable to read db file '%s': %s", filename, strerror(errno));
continue;
}
dir = opendir(udev_db_path);
if (dir == NULL) {
- err("unable to open udev_db '%s'", udev_db_path);
+ err("unable to open udev_db '%s': %s", udev_db_path, strerror(errno));
return -1;
}