mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-09 06:58:30 +07:00
udev: firmware - disable firmware loading when firmware file is 0 byte
If firmware file is not found in the file system, udev terminates firmware loading. This is not the case if firmware file exists in the file system but doesn't have any data in it.
This commit is contained in:
parent
c6aceba193
commit
cf7b139404
@ -140,9 +140,12 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo
|
||||
}
|
||||
|
||||
if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
|
||||
if (!in_initrd())
|
||||
set_loading(udev, loadpath, "-1");
|
||||
rc = EXIT_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (unlink(misspath) == 0)
|
||||
util_delete_path(udev, misspath);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user