summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--namedev.c6
-rw-r--r--namedev.h1
-rw-r--r--namedev_parse.c1
3 files changed, 5 insertions, 3 deletions
diff --git a/namedev.c b/namedev.c
index 505264554d..2ebf276f6b 100644
--- a/namedev.c
+++ b/namedev.c
@@ -822,7 +822,7 @@ int namedev_name_device(struct sysfs_class_device *class_dev, struct udevice *ud
if (match_rule(dev, class_dev, udev, sysfs_device) == 0) {
if (dev->name[0] == '\0' && dev->symlink[0] == '\0') {
info("configured rule in '%s' at line %i applied, '%s' is ignored",
- udev_rules_filename, dev->config_line, udev->kernel_name);
+ dev->config_file, dev->config_line, udev->kernel_name);
return -1;
}
@@ -830,7 +830,7 @@ int namedev_name_device(struct sysfs_class_device *class_dev, struct udevice *ud
char temp[NAME_MAX];
info("configured rule in '%s' at line %i applied, added symlink '%s'",
- udev_rules_filename, dev->config_line, dev->symlink);
+ dev->config_file, dev->config_line, dev->symlink);
/* do not clobber dev */
strfieldcpy(temp, dev->symlink);
apply_format(udev, temp, sizeof(temp),
@@ -841,7 +841,7 @@ int namedev_name_device(struct sysfs_class_device *class_dev, struct udevice *ud
if (dev->name[0] != '\0') {
info("configured rule in '%s' at line %i applied, '%s' becomes '%s'",
- udev_rules_filename, dev->config_line, udev->kernel_name, dev->name);
+ dev->config_file, dev->config_line, udev->kernel_name, dev->name);
strfieldcpy(udev->name, dev->name);
goto found;
}
diff --git a/namedev.h b/namedev.h
index ffdde83ca4..7f875ed603 100644
--- a/namedev.h
+++ b/namedev.h
@@ -72,6 +72,7 @@ struct config_device {
char symlink[NAME_SIZE];
struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
int partitions;
+ char config_file[NAME_SIZE];
int config_line;
};
diff --git a/namedev_parse.c b/namedev_parse.c
index d300b0907d..19acd96ef0 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -260,6 +260,7 @@ static int namedev_parse_rules(char *filename)
}
dev.config_line = lineno;
+ strfieldcpy(dev.config_file, filename);
retval = add_config_dev(&dev);
if (retval) {
dbg("add_config_dev returned with error %d", retval);