zdev: add functionality to read site-specific settings

Modify the dev_get_setting_list function to get the site-specific
attributes of the device. The new site_id parameter for this function
must be less than SITE_FALLBACK to read the site-specific attributes.
As SITE_FALLBACK setting is same as persistent setting, we do not need
a separate read function for it.

Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Vineeth Vijayan
2022-09-11 22:42:40 +02:00
committed by Jan Höppner
parent 2e89722ef0
commit d66ace8121
5 changed files with 24 additions and 10 deletions

View File

@@ -348,7 +348,7 @@ static void _add_setting(const char *filename, struct device *dev,
struct attrib *a;
struct setting_list *list;
list = device_get_setting_list(dev, config);
list = device_get_setting_list(dev, config, SITE_FALLBACK);
a = attrib_find(dev->subtype->dev_attribs, key);
if (!a) {
warnx("%s: Applying unknown device setting %s=%s", filename,