summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/udev/udevd.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 95c6468029..9210da6c47 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1139,13 +1139,26 @@ int main(int argc, char *argv[]) {
goto exit;
}
- label_init("/dev");
+ r = label_init("/dev");
+ if (r < 0) {
+ log_error("could not initialize labelling: %s", strerror(-r));
+ goto exit;
+ }
/* set umask before creating any file/directory */
- chdir("/");
+ r = chdir("/");
+ if (r < 0) {
+ log_error("could not change dir to /: %m");
+ goto exit;
+ }
+
umask(022);
- mkdir("/run/udev", 0755);
+ r = mkdir("/run/udev", 0755);
+ if (r < 0) {
+ log_error("could not create /run/udev: %m");
+ goto exit;
+ }
dev_setup(NULL);