summaryrefslogtreecommitdiff
path: root/udev_add.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_add.c
parentb6d474506f8935084e423f78035ea7206d4c3da0 (diff)
add strerror() to error logs
Diffstat (limited to 'udev_add.c')
-rw-r--r--udev_add.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/udev_add.c b/udev_add.c
index 9420b4fe14..a811b5a17c 100644
--- a/udev_add.c
+++ b/udev_add.c
@@ -73,7 +73,7 @@ int udev_make_node(struct udevice *udev, const char *file, dev_t devt, mode_t mo
}
if (unlink(file) != 0)
- dbg("unlink(%s) failed with error '%s'", file, strerror(errno));
+ dbg("unlink(%s) failed: %s", file, strerror(errno));
else
dbg("already present file '%s' unlinked", file);
@@ -82,7 +82,7 @@ create:
retval = mknod(file, mode, devt);
selinux_resetfscreatecon();
if (retval != 0) {
- err("mknod(%s, %#o, %u, %u) failed with error '%s'",
+ err("mknod(%s, %#o, %u, %u) failed: %s",
file, mode, major(devt), minor(devt), strerror(errno));
goto exit;
}
@@ -90,14 +90,14 @@ create:
perms:
dbg("chmod(%s, %#o)", file, mode);
if (chmod(file, mode) != 0) {
- dbg("chmod(%s, %#o) failed with error '%s'", file, mode, strerror(errno));
+ dbg("chmod(%s, %#o) failed: %s", file, mode, strerror(errno));
goto exit;
}
if (uid != 0 || gid != 0) {
dbg("chown(%s, %u, %u)", file, uid, gid);
if (chown(file, uid, gid) != 0) {
- dbg("chown(%s, %u, %u) failed with error '%s'",
+ dbg("chown(%s, %u, %u) failed: %s",
file, uid, gid, strerror(errno));
goto exit;
}
@@ -222,7 +222,7 @@ static int create_node(struct udevice *udev, struct sysfs_class_device *class_de
retval = symlink(linktarget, filename);
selinux_resetfscreatecon();
if (retval != 0)
- dbg("symlink(%s, %s) failed with error '%s'",
+ dbg("symlink(%s, %s) failed: %s",
linktarget, filename, strerror(errno));
}
}
@@ -244,7 +244,7 @@ static int rename_net_if(struct udevice *udev)
sk = socket(PF_INET, SOCK_DGRAM, 0);
if (sk < 0) {
- dbg("error opening socket");
+ dbg("error opening socket: %s", strerror(errno));
return -1;
}
@@ -254,7 +254,7 @@ static int rename_net_if(struct udevice *udev)
retval = ioctl(sk, SIOCSIFNAME, &ifr);
if (retval != 0)
- dbg("error changing net interface name");
+ dbg("error changing net interface name: %s", strerror(errno));
close(sk);
return retval;