]> granicus.if.org Git - procps-ng/commitdiff
sysctl: support expansion of csh style braces with -p
authorJaromir Capik <jcapik@redhat.com>
Wed, 16 Jul 2014 12:29:42 +0000 (14:29 +0200)
committerJaromir Capik <jcapik@redhat.com>
Wed, 16 Jul 2014 12:29:42 +0000 (14:29 +0200)
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.

sysctl.c

index fc224e5d74c71e4a9ae93d0dfb6f38d046d36bbb..bc83b50fa4e6c591f7f5f9549d267b76ad6b5657 100644 (file)
--- a/sysctl.c
+++ b/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"));