chiark / gitweb /
Prep v229: Mask more unused functions in src/basic
authorSven Eden <yamakuzure@gmx.net>
Thu, 18 May 2017 05:25:40 +0000 (07:25 +0200)
committerSven Eden <yamakuzure@gmx.net>
Thu, 18 May 2017 08:18:11 +0000 (10:18 +0200)
src/basic/conf-files.c
src/basic/conf-files.h
src/basic/escape.c
src/basic/escape.h
src/basic/fileio.c
src/basic/fileio.h
src/basic/umask-util.h

index c781610e14a3e97d94b6c5327e292cf471c1a442..92fc792d6094e8ab237383b379d2da8373ba4228 100644 (file)
@@ -122,6 +122,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const
         return 0;
 }
 
+#if 0 /// UNNEEDED by elogind
 int conf_files_list_strv(char ***strv, const char *suffix, const char *root, const char* const* dirs) {
         _cleanup_strv_free_ char **copy = NULL;
 
@@ -151,6 +152,7 @@ int conf_files_list(char ***strv, const char *suffix, const char *root, const ch
 
         return conf_files_list_strv_internal(strv, suffix, root, dirs);
 }
+#endif // 0
 
 int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, const char *d) {
         _cleanup_strv_free_ char **dirs = NULL;
index e00e0e81fbd3713e5a5d8d49f1285e2227c6a6a5..e77fdd472f63bc77058fed435b64cf345169eaeb 100644 (file)
@@ -20,6 +20,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#if 0 /// UNNEEDED by elogind
 int conf_files_list(char ***ret, const char *suffix, const char *root, const char *dir, ...);
 int conf_files_list_strv(char ***ret, const char *suffix, const char *root, const char* const* dirs);
+#endif // 0
 int conf_files_list_nulstr(char ***ret, const char *suffix, const char *root, const char *dirs);
index 2e483880c80c53996a73c9d9816c8cbcac524b0c..564149306c91a310d2af1d72ac229e4c67b32c65 100644 (file)
@@ -413,6 +413,7 @@ char *xescape(const char *s, const char *bad) {
         return r;
 }
 
+#if 0 /// UNNEEDED by elogind
 static char *strcpy_backslash_escaped(char *t, const char *s, const char *bad) {
         assert(bad);
 
@@ -472,3 +473,4 @@ char *shell_maybe_quote(const char *s) {
 
         return r;
 }
+#endif // 0
index 1b28bd10afc21e920a043f02c51d642eaef6bce5..f57438038019f33120d46aa24556bab5997550db 100644 (file)
@@ -49,5 +49,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit);
 
 char *xescape(const char *s, const char *bad);
 
+#if 0 /// UNNEEDED by elogind
 char *shell_escape(const char *s, const char *bad);
 char *shell_maybe_quote(const char *s);
+#endif // 0
index f2a8f29e677c7180077959994c0cac76c24c4911..3bb1d3e036dd3b10796ef99c3bb3a4fbf865b2aa 100644 (file)
@@ -645,6 +645,7 @@ int parse_env_file(
         return r < 0 ? r : n_pushed;
 }
 
+#if 0 /// UNNEEDED by elogind
 static int load_env_file_push(
                 const char *filename, unsigned line,
                 const char *key, char *value,
@@ -700,7 +701,6 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) {
         return 0;
 }
 
-#if 0 /// UNNEDED by elogind
 static int load_env_file_push_pairs(
                 const char *filename, unsigned line,
                 const char *key, char *value,
@@ -759,7 +759,6 @@ int load_env_file_pairs(FILE *f, const char *fname, const char *newline, char **
         *rl = m;
         return 0;
 }
-#endif // 0
 
 static void write_env_var(FILE *f, const char *v) {
         const char *p;
@@ -821,7 +820,6 @@ int write_env_file(const char *fname, char **l) {
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 int executable_is_script(const char *path, char **interpreter) {
         int r;
         _cleanup_free_ char *line = NULL;
index 0d4de515e53336e164e6c9bb9af3412ee62e2366..0635147b756d38c9fe96c6fe48d7ab82a3118714 100644 (file)
@@ -45,12 +45,12 @@ int read_full_stream(FILE *f, char **contents, size_t *size);
 int verify_file(const char *fn, const char *blob, bool accept_extra_nl);
 
 int parse_env_file(const char *fname, const char *separator, ...) _sentinel_;
+#if 0 /// UNNEEDED by elogind
 int load_env_file(FILE *f, const char *fname, const char *separator, char ***l);
 int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l);
 
 int write_env_file(const char *fname, char **l);
 
-#if 0 /// UNNEEDED by elogind
 int executable_is_script(const char *path, char **interpreter);
 #endif // 0
 
index 359d87d27c2b4f70c667f1c666afc19f997ca04d..be90d5a3cb9188bba95d3e9ae891bc8e983bcf1e 100644 (file)
@@ -31,6 +31,7 @@ static inline void umaskp(mode_t *u) {
 
 #define _cleanup_umask_ _cleanup_(umaskp)
 
+#if 0 /// UNNEEDED by elogind
 struct _umask_struct_ {
         mode_t mask;
         bool quit;
@@ -44,3 +45,4 @@ static inline void _reset_umask_(struct _umask_struct_ *s) {
         for (_cleanup_(_reset_umask_) struct _umask_struct_ _saved_umask_ = { umask(mask), false }; \
              !_saved_umask_.quit ;                                      \
              _saved_umask_.quit = true)
+#endif // 0