chiark / gitweb /
Prep v234: Apply missing upstream fixes in src/basic (1/6)
[elogind.git] / src / basic / proc-cmdline.c
index d0146cae6053784bcb098a8a38cedfd9e9112ba0..e2eba45a3d1cdf0a1e5ba275fa2f75b4f7d26721 100644 (file)
@@ -110,6 +110,7 @@ static bool relaxed_equal_char(char a, char b) {
                 (a == '-' && b == '_');
 }
 
+#if 0 /// UNNEEDED by elogind
 char *proc_cmdline_key_startswith(const char *s, const char *prefix) {
 
         assert(s);
@@ -123,6 +124,7 @@ char *proc_cmdline_key_startswith(const char *s, const char *prefix) {
 
         return (char*) s;
 }
+#endif // 0
 
 bool proc_cmdline_key_streq(const char *x, const char *y) {
         assert(x);
@@ -137,6 +139,7 @@ bool proc_cmdline_key_streq(const char *x, const char *y) {
         return true;
 }
 
+#if 0 /// UNNEEDED by elogind
 int proc_cmdline_get_key(const char *key, unsigned flags, char **value) {
         _cleanup_free_ char *line = NULL, *ret = NULL;
         bool found = false;
@@ -148,13 +151,13 @@ int proc_cmdline_get_key(const char *key, unsigned flags, char **value) {
          * a) The "value" parameter is used. In this case a parameter beginning with the "key" string followed by "="
          *    is searched, and the value following this is returned in "value".
          *
-         * b) as above, but the PROC_CMDLINE_VALUE_OPTIONAL flag is set. In this case if the the key is found as a
+         * b) as above, but the PROC_CMDLINE_VALUE_OPTIONAL flag is set. In this case if the key is found as a
          *    separate word (i.e. not followed by "=" but instead by whitespace or the end of the command line), then
          *    this is also accepted, and "value" is returned as NULL.
          *
          * c) The "value" parameter is NULL. In this case a search for the exact "key" parameter is performed.
          *
-         * In all three cases, > 0 is returned if the key is found, 0 if not.*/
+         * In all three cases, > 0 is returned if the key is found, 0 if not. */
 
         if (isempty(key))
                 return -EINVAL;
@@ -236,7 +239,6 @@ int proc_cmdline_get_bool(const char *key, bool *ret) {
         return 1;
 }
 
-#if 0 /// UNNEEDED by elogind
 int shall_restore_state(void) {
         bool ret;
         int r;