chiark / gitweb /
udev: firmware - disable firmware loading when firmware file is 0 byte
[elogind.git] / src / udev / udev-builtin-firmware.c
index 2fb75a7..4a91d33 100644 (file)
@@ -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);