sysctl: support expansion of csh style braces with -p

This commit adds the GLOB_BRACE flag in the glob flags.
That allows to expand the csh style braces {a,b} and
define multiple independent patterns for config file
locations.
This commit is contained in:
Jaromir Capik 2014-07-16 14:29:42 +02:00
parent b779855cf1
commit f8128568d6

View File

@ -502,7 +502,7 @@ static int Preload(const char *restrict const filename)
int globerr;
int j;
globerr = glob(filename, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf);
globerr = glob(filename, GLOB_NOCHECK | GLOB_TILDE | GLOB_BRACE, NULL, &globbuf);
if (globerr != 0 && globerr != GLOB_NOMATCH)
xerr(EXIT_FAILURE, _("glob failed"));