summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmut Tezduyar <umut@tezduyar.com>2012-11-16 17:07:19 +0100
committerRichard Yao <ryao@cs.stonybrook.edu>2012-11-17 02:59:06 -0500
commitcf7b1394043f609a9d6c22d6b02838b8f3ed0121 (patch)
treeb41e766f893e76501f7090cea712594b1609236e /src
parentc6aceba1934ddb754bf63c7b1a867470a7f75727 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/udev/udev-builtin-firmware.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
index 2fb75a7335..4a91d33575 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);