mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-08-25 17:27:20 +00:00
udev: check return value of uname.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
c309a7137b
commit
f459285212
+5
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user