diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udev-builtin-blkid.c | 7 | ||||
-rw-r--r-- | src/udev/udev-node.c | 10 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index 23a24da907..24adb71b17 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -143,7 +143,6 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t const char *name; int nvals; int i; - size_t len; int err = 0; static const struct option options[] = { @@ -201,10 +200,10 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t nvals = blkid_probe_numof_values(pr); for (i = 0; i < nvals; i++) { - if (blkid_probe_get_value(pr, i, &name, &data, &len)) + if (blkid_probe_get_value(pr, i, &name, &data, NULL)) continue; - len = strnlen((char *) data, len); - print_property(dev, test, name, (char *) data); + + print_property(dev, test, name, data); } blkid_free_probe(pr); diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 2dddc7b4b4..e4efd242db 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -286,13 +286,11 @@ 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); - ; 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; - } + 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); } |