Skip to content

Commit

Permalink
[ssu-sysinfo] Glob hw-settings ini files. JB#40268
Browse files Browse the repository at this point in the history
Instead of using just hw-settings.ini look for all ini files having
hw-settings in the filename and merge the contents.

Signed-off-by: Juho Hämäläinen <juho.hamalainen@jolla.com>
  • Loading branch information
jusa committed Mar 9, 2018
1 parent 69d126f commit be7daf5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/ssusysinfo.c
Expand Up @@ -141,8 +141,14 @@ ssusysinfo_load_release_info(ssusysinfo_t *self)
static void
ssusysinfo_load_hw_settings(ssusysinfo_t *self)
{
inifile_load(self->cfg_ini, "/usr/share/csd/settings.d/hw-settings.ini",
0);
glob_t gl = {};

if (glob("/usr/share/csd/settings.d/*hw-settings*.ini", 0, 0, &gl) == 0) {
for (size_t i = 0; i < gl.gl_pathc; ++i)
inifile_load(self->cfg_ini, gl.gl_pathv[i], 0);
}

globfree(&gl);
}

/** Load all SSU configuration files
Expand Down

0 comments on commit be7daf5

Please sign in to comment.