summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2013-03-27 15:16:36 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-28 23:45:58 -0400
commitf45928521249bbaf5dbea84933ae2fcaf5354080 (patch)
treea456364696c05e61fdb85cce678a894c6616f831 /src/udev/udevd.c
parentc309a7137b06516eafc055eaab31df964599a8b3 (diff)
udev: check return value of uname.
Diffstat (limited to 'src/udev/udevd.c')
-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)