chiark / gitweb /
Rename user_runtime to user_runtime_dir
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Oct 2014 12:01:00 +0000 (08:01 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Oct 2014 15:10:35 +0000 (11:10 -0400)
This makes this function name similar to user_config_home() and makes
it match the name of the environment variable.

src/core/unit.c
src/shared/install.c
src/shared/path-lookup.c
src/shared/path-lookup.h

index 8a7df01284b64109015f931d4024eba9a8941f74..399d2027383deb06dc6860cb073243eb8c0ac111 100644 (file)
@@ -3083,7 +3083,7 @@ static int unit_drop_in_dir(Unit *u, UnitSetPropertiesMode mode, bool transient,
                 if (mode == UNIT_PERSISTENT && !transient)
                         r = user_config_home(dir);
                 else
                 if (mode == UNIT_PERSISTENT && !transient)
                         r = user_config_home(dir);
                 else
-                        r = user_runtime(dir);
+                        r = user_runtime_dir(dir);
 
                 if (r == 0)
                         return -ENOENT;
 
                 if (r == 0)
                         return -ENOENT;
@@ -3232,7 +3232,7 @@ int unit_make_transient(Unit *u) {
         if (u->manager->running_as == SYSTEMD_USER) {
                 _cleanup_free_ char *c = NULL;
 
         if (u->manager->running_as == SYSTEMD_USER) {
                 _cleanup_free_ char *c = NULL;
 
-                r = user_runtime(&c);
+                r = user_runtime_dir(&c);
                 if (r < 0)
                         return r;
                 if (r == 0)
                 if (r < 0)
                         return r;
                 if (r == 0)
index 302b5237a6f8a08a0da9419e33c85a6829008261..fa064c230fdeb98de6e06bc8fb1340ae5a834a42 100644 (file)
@@ -109,7 +109,7 @@ static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
                         return -EINVAL;
 
                 if (runtime)
                         return -EINVAL;
 
                 if (runtime)
-                        r = user_runtime(&p);
+                        r = user_runtime_dir(&p);
                 else
                         r = user_config_home(&p);
 
                 else
                         r = user_config_home(&p);
 
index 3a6e117d28c56702d365897868bea3e4134c3e34..d7ed6e9e3c2cdaeadd407ab679090dc95a53ab60 100644 (file)
@@ -61,7 +61,7 @@ int user_config_home(char **config_home) {
         return 0;
 }
 
         return 0;
 }
 
-int user_runtime(char **user_runtime_path) {
+int user_runtime_dir(char **runtime_dir) {
         const char *e;
         char *r;
 
         const char *e;
         char *r;
 
@@ -71,7 +71,7 @@ int user_runtime(char **user_runtime_path) {
                 if (!r)
                         return -ENOMEM;
 
                 if (!r)
                         return -ENOMEM;
 
-                *user_runtime_path = r;
+                *runtime_dir = r;
                 return 1;
         }
 
                 return 1;
         }
 
@@ -101,7 +101,7 @@ static char** user_dirs(
         };
 
         const char *home, *e;
         };
 
         const char *home, *e;
-        _cleanup_free_ char *config_home = NULL, *user_runtime_dir = NULL, *data_home = NULL;
+        _cleanup_free_ char *config_home = NULL, *runtime_dir = NULL, *data_home = NULL;
         _cleanup_strv_free_ char **config_dirs = NULL, **data_dirs = NULL;
         char **r = NULL;
 
         _cleanup_strv_free_ char **config_dirs = NULL, **data_dirs = NULL;
         char **r = NULL;
 
@@ -117,7 +117,7 @@ static char** user_dirs(
         if (user_config_home(&config_home) < 0)
                 goto fail;
 
         if (user_config_home(&config_home) < 0)
                 goto fail;
 
-        if (user_runtime(&user_runtime_dir) < 0)
+        if (user_runtime_dir(&runtime_dir) < 0)
                 goto fail;
 
         home = getenv("HOME");
                 goto fail;
 
         home = getenv("HOME");
@@ -162,8 +162,8 @@ static char** user_dirs(
                 if (strv_extend(&r, config_home) < 0)
                         goto fail;
 
                 if (strv_extend(&r, config_home) < 0)
                         goto fail;
 
-        if (user_runtime_dir)
-                if (strv_extend(&r, user_runtime_dir) < 0)
+        if (runtime_dir)
+                if (strv_extend(&r, runtime_dir) < 0)
                         goto fail;
 
         if (strv_extend(&r, runtime_unit_path) < 0)
                         goto fail;
 
         if (strv_extend(&r, runtime_unit_path) < 0)
index 8da076a30b0062513e545bb820724d58d2478916..b8a0aace83ad8c0a83e78a1c98233de9f5969d4b 100644 (file)
@@ -39,7 +39,7 @@ typedef enum SystemdRunningAs {
 } SystemdRunningAs;
 
 int user_config_home(char **config_home);
 } SystemdRunningAs;
 
 int user_config_home(char **config_home);
-int user_runtime(char **user_runtime_path);
+int user_runtime_dir(char **runtime_dir);
 
 int lookup_paths_init(LookupPaths *p,
                       SystemdRunningAs running_as,
 
 int lookup_paths_init(LookupPaths *p,
                       SystemdRunningAs running_as,