summaryrefslogtreecommitdiff
path: root/src/udev/udev-node.c
diff options
context:
space:
mode:
authorblueness <basile@opensource.dyc.edu>2014-03-22 16:51:07 -0400
committerblueness <basile@opensource.dyc.edu>2014-03-22 16:51:07 -0400
commitfbfcfb49a6f2bfa61e235f5fe601fa9a9f95b4ea (patch)
tree41068dda4890be00135e260e30620400997cb662 /src/udev/udev-node.c
parent12c87cef17934b0909b96fdaa18b178963ec4436 (diff)
parent728baddb472075e21421ebdc5de0a6e992453fbc (diff)
Merge pull request #90 from lhb-jr/fix_nocheckreturn
Fixed gcc warnings that call returns not checked Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-node.c')
-rw-r--r--src/udev/udev-node.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index 200e24fb41..2dddc7b4b4 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -286,8 +286,13 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
if ((stats.st_mode & 0777) != (mode & 0777) || stats.st_uid != uid || stats.st_gid != gid) {
log_debug("set permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
- chmod(devnode, mode);
- chown(devnode, uid, gid);
+ ;
+ if((chmod(devnode, mode) !=0 ) || (chown(devnode, uid,gid) !=0)) {
+ err = -errno;
+ log_error("FAILED to set permissions %s, %#o, uid=%u, gid=%u"
+ ,devnode, mode, uid, gid);
+ goto out;
+ }
} else {
log_debug("preserve permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
}