From: Yehuda Sadeh Date: Wed, 11 Mar 2009 22:33:43 +0000 (-0700) Subject: config: search in global section by default X-Git-Tag: v0.7.1^2~91 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=45d36ff64cf80cea3f58b9591b52a6bfddfa01f1;p=ceph.git config: search in global section by default --- diff --git a/src/cconf.cc b/src/cconf.cc index 0fbba7fdedfa..2760132a1f1a 100644 --- a/src/cconf.cc +++ b/src/cconf.cc @@ -12,6 +12,14 @@ using namespace std; #include "config.h" #include "common/ConfUtils.h" + +const char *id = NULL, *type = NULL; +char *name, *alt_name; + +char *post_process_val(char *val) +{ +} + void usage() { cerr << "usage: cconf <-c filename> [-t type] [-i id] [-l|--list_sections ] [-s
] [[-s section] ... ] [default]" << std::endl; @@ -25,8 +33,6 @@ int main(int argc, const char **argv) const char *list_sections = 0; char *val; int param = 0; - const char *id = NULL, *type = NULL; - char *name, *alt_name; deque args; deque sections; argv_to_deq(argc, argv, args); diff --git a/src/config.cc b/src/config.cc index 63237b966aa8..09ad5b239471 100644 --- a/src/config.cc +++ b/src/config.cc @@ -743,7 +743,7 @@ void parse_config_file(ConfFile *cf, bool auto_update, const char *module_type, cf->parse(); for (int i=0; isection; + if (section) + break; + default: + s = 3; + section = "global"; } switch (opt->type) {