libudev: add missing errno initialization/error propagation (#6781)
authorLennart Poettering <lennart@poettering.net>
Sat, 9 Sep 2017 20:31:09 +0000 (22:31 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 9 Sep 2017 20:31:09 +0000 (22:31 +0200)
commit309f631d41374ec8e724b1debdafd7ae40489b6e
tree29f31e19ea0aefbb860c5abfa9294e41a799d521
parent0aabe74749918c97e9562631fcc55e41ec3a73cd
libudev: add missing errno initialization/error propagation (#6781)

In libudev (which es much older code than the rest of systemd), we
propagate errors in functions not returning an int, via (positive) errno
(i.e. libc-style), and as negative Exyz values in those returning an int
(much preferred, i.e. Linux kernel style). Let's fix up a few place,
where this was incorrectly done, or not done at all.

Fixes: #6613
src/libudev/libudev-enumerate.c
src/libudev/libudev-hwdb.c
src/libudev/libudev-monitor.c
src/libudev/libudev-queue.c
src/libudev/libudev.c