mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
[PATCH] detect NAME="" as ignore_device rule
This commit is contained in:
parent
5e39f90b14
commit
69f57c6a2b
@ -749,15 +749,6 @@ int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_d
|
|||||||
dbg("process rule");
|
dbg("process rule");
|
||||||
if (match_rule(udev, dev, class_dev, sysfs_device) == 0) {
|
if (match_rule(udev, dev, class_dev, sysfs_device) == 0) {
|
||||||
|
|
||||||
/* FIXME: remove old style ignore rule and make OPTION="ignore" mandatory */
|
|
||||||
if (dev->name[0] == '\0' && dev->symlink[0] == '\0' &&
|
|
||||||
dev->mode == 0000 && dev->owner[0] == '\0' && dev->group[0] == '\0' &&
|
|
||||||
!dev->ignore_device && !dev->partitions && !dev->ignore_remove) {
|
|
||||||
info("configured rule in '%s[%i]' applied, '%s' is ignored",
|
|
||||||
dev->config_file, dev->config_line, udev->kernel_name);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* apply options */
|
/* apply options */
|
||||||
if (dev->ignore_device) {
|
if (dev->ignore_device) {
|
||||||
info("configured rule in '%s[%i]' applied, '%s' is ignored",
|
info("configured rule in '%s[%i]' applied, '%s' is ignored",
|
||||||
|
@ -259,7 +259,10 @@ static int namedev_parse(const char *filename, void *data)
|
|||||||
dev.ignore_remove = 1;
|
dev.ignore_remove = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (temp3[0] != '\0')
|
||||||
strfieldcpy(dev.name, temp3);
|
strfieldcpy(dev.name, temp3);
|
||||||
|
else
|
||||||
|
dev.ignore_device = 1;
|
||||||
valid = 1;
|
valid = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user