From: Umut Tezduyar Date: Fri, 16 Nov 2012 16:07:19 +0000 (+0100) Subject: udev: firmware - disable firmware loading when firmware file is 0 byte X-Git-Tag: v196~48 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5bb633f13aff7f507ed494a51c7b9e4ca5e4377c;p=elogind.git 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. --- diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c index 2fb75a733..4a91d3357 100644 --- a/src/udev/udev-builtin-firmware.c +++ b/src/udev/udev-builtin-firmware.c @@ -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);