chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c309a71
)
udev: check return value of uname.
author
Václav Pavlín
<vpavlin@redhat.com>
Wed, 27 Mar 2013 14:16:36 +0000
(15:16 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 29 Mar 2013 03:45:58 +0000
(23:45 -0400)
src/udev/udevd.c
patch
|
blob
|
history
diff --git
a/src/udev/udevd.c
b/src/udev/udevd.c
index 2ad73881d6cdcead779a52bbb3eb1be9ff0a0c39..42cf994b0d8d7887cf9aafb8316e5d4e00d3db75 100644
(file)
--- 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;
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)
strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
f = fopen(modules, "re");
if (f == NULL)