]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: rename config_parse_many to …_nulstr
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 10 Sep 2016 10:02:40 +0000 (11:02 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 Sep 2016 14:32:03 +0000 (10:32 -0400)
In preparation for adding a version which takes a strv.

14 files changed:
src/basic/def.h
src/core/main.c
src/coredump/coredump.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload.c
src/journal/journald-server.c
src/login/logind.c
src/network/networkd-conf.c
src/network/networkd-network.c
src/resolve/resolved-conf.c
src/shared/conf-parser.c
src/shared/conf-parser.h
src/shared/sleep-config.c
src/timesync/timesyncd-conf.c

index 1a7a0f4928b908bd22163c37e8c32179cb9aa1a0..2266eff650b60acc598d18c7015c3a5d1f773bcb 100644 (file)
@@ -79,7 +79,7 @@
 #endif
 
 /* Return a nulstr for a standard cascade of configuration paths,
- * suitable to pass to conf_files_list_nulstr() or config_parse_many()
+ * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr()
  * to implement drop-in directories for extending configuration
  * files. */
 #define CONF_PATHS_NULSTR(n) \
index 7d8322ebd89788998ae5b97ba44071580239b646..803307c9d549b9b87e8c82082f8d79d0830801b8 100644 (file)
@@ -715,7 +715,7 @@ static int parse_config_file(void) {
                 CONF_PATHS_NULSTR("systemd/system.conf.d") :
                 CONF_PATHS_NULSTR("systemd/user.conf.d");
 
-        config_parse_many(fn, conf_dirs_nulstr, "Manager\0", config_item_table_lookup, items, false, NULL);
+        config_parse_many_nulstr(fn, conf_dirs_nulstr, "Manager\0", config_item_table_lookup, items, false, NULL);
 
         /* Traditionally "0" was used to turn off the default unit timeouts. Fix this up so that we used USEC_INFINITY
          * like everywhere else. */
index be724aed4ea23182dee2a9dcc3b149d41aaa90ea..9dea10b3e106e16339686536950c280b43b94e05 100644 (file)
@@ -128,7 +128,7 @@ static int parse_config(void) {
                 {}
         };
 
-        return config_parse_many(PKGSYSCONFDIR "/coredump.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/coredump.conf",
                                  CONF_PATHS_NULSTR("systemd/coredump.conf.d"),
                                  "Coredump\0",
                                  config_item_table_lookup, items,
index 80e2adb10081a69f67e3b2d415f107a318fa893b..220c71754ac1dd890a75f8d7c636871f2583ef1e 100644 (file)
@@ -1198,7 +1198,7 @@ static int parse_config(void) {
                 { "Remote",  "TrustedCertificateFile", config_parse_path,             0, &arg_trust      },
                 {}};
 
-        return config_parse_many(PKGSYSCONFDIR "/journal-remote.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/journal-remote.conf",
                                  CONF_PATHS_NULSTR("systemd/journal-remote.conf.d"),
                                  "Remote\0", config_item_table_lookup, items,
                                  false, NULL);
index 4647cfdeb3aeae55c45017bdd57350b53806e8f9..c0f967ab94e1194c2fc6e4a61ae87bd68fde17f8 100644 (file)
@@ -542,7 +542,7 @@ static int parse_config(void) {
                 { "Upload",  "TrustedCertificateFile", config_parse_path,   0, &arg_trust  },
                 {}};
 
-        return config_parse_many(PKGSYSCONFDIR "/journal-upload.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/journal-upload.conf",
                                  CONF_PATHS_NULSTR("systemd/journal-upload.conf.d"),
                                  "Upload\0", config_item_table_lookup, items,
                                  false, NULL);
index 3507910919bf6656566dd5db2a12cbf838673eb8..cc352dbae258291e70dfe7d28d821d4dd6ed78dd 100644 (file)
@@ -1474,7 +1474,7 @@ static int server_parse_proc_cmdline(Server *s) {
 static int server_parse_config_file(Server *s) {
         assert(s);
 
-        return config_parse_many(PKGSYSCONFDIR "/journald.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/journald.conf",
                                  CONF_PATHS_NULSTR("systemd/journald.conf.d"),
                                  "Journal\0",
                                  config_item_perf_lookup, journald_gperf_lookup,
index bbbf4aef571538781d6a3dad2fda5242e8274c4b..a9a06f5e28ba0a4cd987157b9e1ff1fe282d70cb 100644 (file)
@@ -1002,7 +1002,7 @@ static int manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us
 static int manager_parse_config_file(Manager *m) {
         assert(m);
 
-        return config_parse_many(PKGSYSCONFDIR "/logind.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/logind.conf",
                                  CONF_PATHS_NULSTR("systemd/logind.conf.d"),
                                  "Login\0",
                                  config_item_perf_lookup, logind_gperf_lookup,
index c03e2b2ebfece488b82bf4f010cdb6e8e20c7624..49bb8c18f6ea837571d9ebda8138410a7ec1d4c1 100644 (file)
@@ -29,7 +29,7 @@
 int manager_parse_config_file(Manager *m) {
         assert(m);
 
-        return config_parse_many(PKGSYSCONFDIR "/networkd.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/networkd.conf",
                                  CONF_PATHS_NULSTR("systemd/networkd.conf.d"),
                                  "DHCP\0",
                                  config_item_perf_lookup, networkd_gperf_lookup,
index 0b36f13be8e8f9b16ded3c4dcb592aa144fccece..1ce23b1ddb962465e19c9583068f9e78d83dc434 100644 (file)
@@ -151,7 +151,7 @@ static int network_load_one(Manager *manager, const char *filename) {
         if (r < 0)
                 return r;
 
-        r = config_parse_many(filename, dropin_dirs_nulstr,
+        r = config_parse_many_nulstr(filename, dropin_dirs_nulstr,
                          "Match\0"
                          "Link\0"
                          "Network\0"
index dd233e7c4aa87e67c8d76de0c86ee2b287fec02d..83f7596ac83a0fb7583418cfa7670fae680551b9 100644 (file)
@@ -221,7 +221,7 @@ int manager_parse_config_file(Manager *m) {
 
         assert(m);
 
-        r = config_parse_many(PKGSYSCONFDIR "/resolved.conf",
+        r = config_parse_many_nulstr(PKGSYSCONFDIR "/resolved.conf",
                               CONF_PATHS_NULSTR("systemd/resolved.conf.d"),
                               "Resolve\0",
                               config_item_perf_lookup, resolved_gperf_lookup,
index f31d2194185fd1e045476785175bae5b839e5715..f3351c6bb271d6ad9fd50508d19d81bfd103a392 100644 (file)
@@ -397,13 +397,15 @@ int config_parse(const char *unit,
 }
 
 /* Parse each config file in the specified directories. */
-int config_parse_many(const char *conf_file,
-                      const char *conf_file_dirs,
-                      const char *sections,
-                      ConfigItemLookup lookup,
-                      const void *table,
-                      bool relaxed,
-                      void *userdata) {
+int config_parse_many_nulstr(
+                const char *conf_file,
+                const char *conf_file_dirs,
+                const char *sections,
+                ConfigItemLookup lookup,
+                const void *table,
+                bool relaxed,
+                void *userdata) {
+
         _cleanup_strv_free_ char **files = NULL;
         char **fn;
         int r;
index 3298dc0cea4ec4b51e4ce12a119bfb497a080aa9..e0b8d83dabf82e85a04eba10b4ac338329b93784 100644 (file)
@@ -84,24 +84,26 @@ int config_item_table_lookup(const void *table, const char *section, const char
  * ConfigPerfItem tables */
 int config_item_perf_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata);
 
-int config_parse(const char *unit,
-                 const char *filename,
-                 FILE *f,
-                 const char *sections,  /* nulstr */
-                 ConfigItemLookup lookup,
-                 const void *table,
-                 bool relaxed,
-                 bool allow_include,
-                 bool warn,
-                 void *userdata);
-
-int config_parse_many(const char *conf_file,      /* possibly NULL */
-                      const char *conf_file_dirs, /* nulstr */
-                      const char *sections,       /* nulstr */
-                      ConfigItemLookup lookup,
-                      const void *table,
-                      bool relaxed,
-                      void *userdata);
+int config_parse(
+                const char *unit,
+                const char *filename,
+                FILE *f,
+                const char *sections,  /* nulstr */
+                ConfigItemLookup lookup,
+                const void *table,
+                bool relaxed,
+                bool allow_include,
+                bool warn,
+                void *userdata);
+
+int config_parse_many_nulstr(
+                const char *conf_file,      /* possibly NULL */
+                const char *conf_file_dirs, /* nulstr */
+                const char *sections,       /* nulstr */
+                ConfigItemLookup lookup,
+                const void *table,
+                bool relaxed,
+                void *userdata);
 
 /* Generic parsers */
 int config_parse_int(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
index f00624d0f20ad20ea09708c5fc0ca068b8e422d3..ed31a80c8d036cb178dcca49f756c7ec450181ed 100644 (file)
@@ -58,7 +58,7 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states) {
                 {}
         };
 
-        config_parse_many(PKGSYSCONFDIR "/sleep.conf",
+        config_parse_many_nulstr(PKGSYSCONFDIR "/sleep.conf",
                           CONF_PATHS_NULSTR("systemd/sleep.conf.d"),
                           "Sleep\0", config_item_table_lookup, items,
                           false, NULL);
index 20c64a3354a63bfac410608d0d571292cff9a2a1..bf25b112e16f894a065bc758494f1ba28405890a 100644 (file)
@@ -98,7 +98,7 @@ int config_parse_servers(
 int manager_parse_config_file(Manager *m) {
         assert(m);
 
-        return config_parse_many(PKGSYSCONFDIR "/timesyncd.conf",
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/timesyncd.conf",
                                  CONF_PATHS_NULSTR("systemd/timesyncd.conf.d"),
                                  "Time\0",
                                  config_item_perf_lookup, timesyncd_gperf_lookup,