summaryrefslogtreecommitdiff
path: root/udev_db.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2005-11-07 18:44:18 +0100
committerKay Sievers <kay.sievers@suse.de>2005-11-07 18:44:18 +0100
commitff3e4bed21aaff673284f2e024da26c1e39cfda6 (patch)
tree41d3656f4ec95d0b3d7cc4d510501b7a2529c5b1 /udev_db.c
parentb6d474506f8935084e423f78035ea7206d4c3da0 (diff)
add strerror() to error logs
Diffstat (limited to 'udev_db.c')
-rw-r--r--udev_db.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/udev_db.c b/udev_db.c
index bf369ac2e6..f00308bd2f 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -95,7 +95,7 @@ int udev_db_add_device(struct udevice *udev)
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);
@@ -129,7 +129,7 @@ int udev_db_get_device(struct udevice *udev, const char *devpath)
devpath_to_db_path(devpath, filename, sizeof(filename));
if (file_map(filename, &buf, &bufsize) != 0) {
- dbg("no db file to read '%s'", filename);
+ dbg("no db file to read %s: %s", filename, strerror(errno));
return -1;
}
@@ -210,7 +210,7 @@ int udev_db_lookup_name(const char *name, char *devpath, size_t len)
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;
}
@@ -235,7 +235,7 @@ int udev_db_lookup_name(const char *name, char *devpath, size_t len)
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;
}
@@ -278,7 +278,7 @@ int udev_db_get_all_entries(struct list_head *name_list)
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;
}