[systemd-devel] [PATCH] Disable firmware loading when firmware file is 0 byte

Umut Tezduyar umut at tezduyar.com
Fri Nov 16 07:05:10 PST 2012


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.
---
 systemd/src/udev/udev-builtin-firmware.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/systemd/src/udev/udev-builtin-firmware.c b/systemd/src/udev/udev-builtin-firmware.c
index de93d7b..0160c2e 100644
--- a/systemd/src/udev/udev-builtin-firmware.c
+++ b/systemd/src/udev/udev-builtin-firmware.c
@@ -140,6 +140,7 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo
         }
 
         if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
+                set_loading(udev, loadpath, "-1");
                 rc = EXIT_FAILURE;
                 goto exit;
         }
-- 
1.7.2.5



More information about the systemd-devel mailing list