udev: firmware - do not created /run/udev/firmware-missing/
The userspace firmware loader is deprecated now, and will be entirely removed when we depend on a kernel version with the built-in firmware loader available.
This commit is contained in:
parent
d288f79fb4
commit
3f60bcb5e6
2
TODO
2
TODO
|
@ -421,7 +421,7 @@ Features:
|
||||||
* ConditionSecurity= should learn about IMA and SMACK
|
* ConditionSecurity= should learn about IMA and SMACK
|
||||||
|
|
||||||
* udev:
|
* udev:
|
||||||
- remove all (misguided from day 1) userspace firmware_class handling
|
- remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
|
||||||
- move to LGPL
|
- move to LGPL
|
||||||
- unify utf8 validator code with shared/
|
- unify utf8 validator code with shared/
|
||||||
- kill scsi_id
|
- kill scsi_id
|
||||||
|
|
|
@ -78,8 +78,6 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo
|
||||||
{
|
{
|
||||||
struct udev *udev = udev_device_get_udev(dev);
|
struct udev *udev = udev_device_get_udev(dev);
|
||||||
static const char *searchpath[] = { FIRMWARE_PATH };
|
static const char *searchpath[] = { FIRMWARE_PATH };
|
||||||
char fwencpath[UTIL_PATH_SIZE];
|
|
||||||
char misspath[UTIL_PATH_SIZE];
|
|
||||||
char loadpath[UTIL_PATH_SIZE];
|
char loadpath[UTIL_PATH_SIZE];
|
||||||
char datapath[UTIL_PATH_SIZE];
|
char datapath[UTIL_PATH_SIZE];
|
||||||
char fwpath[UTIL_PATH_SIZE];
|
char fwpath[UTIL_PATH_SIZE];
|
||||||
|
@ -111,23 +109,10 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
util_path_encode(firmware, fwencpath, sizeof(fwencpath));
|
|
||||||
strscpyl(misspath, sizeof(misspath), "/run/udev/firmware-missing/", fwencpath, NULL);
|
|
||||||
strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
|
strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
|
||||||
|
|
||||||
if (fwfile == NULL) {
|
if (fwfile == NULL) {
|
||||||
int err;
|
|
||||||
|
|
||||||
/* This link indicates the missing firmware file and the associated device */
|
|
||||||
log_debug("did not find firmware file '%s'\n", firmware);
|
log_debug("did not find firmware file '%s'\n", firmware);
|
||||||
do {
|
|
||||||
err = mkdir_parents(misspath, 0755);
|
|
||||||
if (err != 0 && err != -ENOENT)
|
|
||||||
break;
|
|
||||||
err = symlink(udev_device_get_devpath(dev), misspath);
|
|
||||||
if (err != 0)
|
|
||||||
err = -errno;
|
|
||||||
} while (err == -ENOENT);
|
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
/*
|
/*
|
||||||
* Do not cancel the request in the initrd, the real root might have
|
* Do not cancel the request in the initrd, the real root might have
|
||||||
|
@ -146,9 +131,6 @@ static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], boo
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlink(misspath) == 0)
|
|
||||||
util_delete_path(udev, misspath);
|
|
||||||
|
|
||||||
if (!set_loading(udev, loadpath, "1"))
|
if (!set_loading(udev, loadpath, "1"))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
|
|
@ -256,12 +256,6 @@ static void cleanup_db(struct udev *udev)
|
||||||
cleanup_dir(dir, 0, 1);
|
cleanup_dir(dir, 0, 1);
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
dir = opendir("/run/udev/firmware-missing");
|
|
||||||
if (dir != NULL) {
|
|
||||||
cleanup_dir(dir, 0, 1);
|
|
||||||
closedir(dir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix)
|
static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix)
|
||||||
|
|
Loading…
Reference in New Issue