[PATCH 3/3] blspec: take extra entries into account

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wire up the possible extra entries during entry matching.

Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx>
---
 common/blspec.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/common/blspec.c b/common/blspec.c
index e361a02333..e950de4e99 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -512,7 +512,9 @@ int blspec_scan_file(struct bootentries *bootentries, const char *root,
 		     const char *configname)
 {
 	char *devname = NULL, *hwdevname = NULL;
+	struct blspec_extra_entry *extra;
 	struct blspec_entry *entry;
+	bool found;
 
 	if (blspec_have_entry(bootentries, configname))
 		return -EEXIST;
@@ -526,7 +528,16 @@ int blspec_scan_file(struct bootentries *bootentries, const char *root,
 	entry->configpath = xstrdup(configname);
 	entry->cdev = get_cdev_by_mountpath(root);
 
-	if (!entry_is_of_compatible(entry, of_get_machine_compatible())) {
+	found = entry_is_of_compatible(entry, of_get_machine_compatible());
+	if (!found && blspec_extra_list) {
+		list_for_each_entry(extra, blspec_extra_list, list) {
+			found = entry_is_of_compatible(entry, extra->compatible);
+			if (found)
+				break;
+		}
+	}
+
+	if (!found) {
 		blspec_entry_free(&entry->entry);
 		return -ENODEV;
 	}
-- 
2.42.0





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux