From ff3e4bed21aaff673284f2e024da26c1e39cfda6 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Mon, 7 Nov 2005 18:44:18 +0100 Subject: add strerror() to error logs --- udev_remove.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'udev_remove.c') diff --git a/udev_remove.c b/udev_remove.c index 0d536bc8ff..621fcc1960 100644 --- a/udev_remove.c +++ b/udev_remove.c @@ -56,8 +56,7 @@ static int delete_path(const char *path) if (retval) { if (errno == ENOTEMPTY) return 0; - dbg("rmdir(%s) failed with error '%s'", - path, strerror(errno)); + dbg("rmdir(%s) failed: %s", path, strerror(errno)); break; } dbg("removed '%s'", path); @@ -153,8 +152,8 @@ int udev_remove_device(struct udevice *udev) dbg("remove name='%s'", udev->name); udev_db_delete_device(udev); } else { - dbg("'%s' not found in database, using kernel name '%s'", udev->devpath, udev->kernel_name); - strlcpy(udev->name, udev->kernel_name, sizeof(udev->name)); + dbg("'%s' not found in database, don't remove anything", udev->devpath); + return -1; } return delete_node(udev); -- cgit v1.2.3-54-g00ecf