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:
parent
b779855cf1
commit
f8128568d6
2
sysctl.c
2
sysctl.c
@ -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"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user