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 globerr;
|
||||||
int j;
|
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)
|
if (globerr != 0 && globerr != GLOB_NOMATCH)
|
||||||
xerr(EXIT_FAILURE, _("glob failed"));
|
xerr(EXIT_FAILURE, _("glob failed"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user