summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/udev/udevd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 2ad73881d6..42cf994b0d 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -819,7 +819,11 @@ static void static_dev_create_from_modules(struct udev *udev)
char buf[4096];
FILE *f;
- uname(&kernel);
+ if (uname(&kernel) < 0) {
+ log_error("uname failed: %m");
+ return;
+ }
+
strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
f = fopen(modules, "re");
if (f == NULL)