[systemd-devel] [PATCH 2/3] udev: check return value of uname.
Vaclav Pavlin
vpavlin at redhat.com
Wed Mar 27 07:16:36 PDT 2013
From: Václav Pavlín <vpavlin at redhat.com>
---
src/udev/udevd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index b30bedf..379168d 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -819,7 +819,9 @@ static void static_dev_create_from_modules(struct udev *udev)
char buf[4096];
FILE *f;
- uname(&kernel);
+ if (uname(&kernel) < 0)
+ return;
+
strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
f = fopen(modules, "re");
if (f == NULL)
--
1.8.1.4
More information about the systemd-devel
mailing list