Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb40268' into 'master'
Glob hw-settings ini files.

See merge request !7
  • Loading branch information
spiiroin committed Mar 9, 2018
2 parents 69d126f + 2327366 commit b650cd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/inifile.c
Expand Up @@ -462,7 +462,7 @@ inifile_load(inifile_t *self, const char *path, const char *defsec)

if( *pos == 0 ) continue;

if( *pos == '#' ) continue;
if( *pos == ';' || *pos == '#' ) continue;

if( *pos == BRA )
{
Expand Down
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 b650cd9

Please sign in to comment.