]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
install: rename unit_file_is_generated() → path_is_generator()
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Feb 2016 20:45:19 +0000 (21:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Apr 2016 11:43:30 +0000 (13:43 +0200)
This way the funciton name matches nicely our other calls path_is_config() and
path_is_runtime().

src/shared/install.c

index 59582e573dbc65cd77d81e2c3b77db9a2e3e2949..e0846c9fbfe2769bb8e3e6a3917d3213494a88e3 100644 (file)
@@ -82,7 +82,7 @@ static int in_search_path(const char *path, char **search) {
         return false;
 }
 
-static int unit_file_is_generated(const LookupPaths *p, const char *path) {
+static int path_is_generator(const LookupPaths *p, const char *path) {
         _cleanup_free_ char *parent = NULL;
 
         assert(p);
@@ -1695,7 +1695,7 @@ int unit_file_add_dependency(
                 return r;
         if (target_info->type == UNIT_FILE_TYPE_MASKED)
                 return -ESHUTDOWN;
-        if (unit_file_is_generated(&paths, target_info->path))
+        if (path_is_generator(&paths, target_info->path))
                 return -EADDRNOTAVAIL;
 
         assert(target_info->type == UNIT_FILE_TYPE_REGULAR);
@@ -1708,7 +1708,7 @@ int unit_file_add_dependency(
                         return r;
                 if (i->type == UNIT_FILE_TYPE_MASKED)
                         return -ESHUTDOWN;
-                if (unit_file_is_generated(&paths, i->path))
+                if (path_is_generator(&paths, i->path))
                         return -EADDRNOTAVAIL;
 
                 assert(i->type == UNIT_FILE_TYPE_REGULAR);
@@ -1766,7 +1766,7 @@ int unit_file_enable(
                         return r;
                 if (i->type == UNIT_FILE_TYPE_MASKED)
                         return -ESHUTDOWN;
-                if (unit_file_is_generated(&paths, i->path))
+                if (path_is_generator(&paths, i->path))
                         return -EADDRNOTAVAIL;
 
                 assert(i->type == UNIT_FILE_TYPE_REGULAR);
@@ -1888,7 +1888,7 @@ int unit_file_set_default(
                 return r;
         if (i->type == UNIT_FILE_TYPE_MASKED)
                 return -ESHUTDOWN;
-        if (unit_file_is_generated(&paths, i->path))
+        if (path_is_generator(&paths, i->path))
                 return -EADDRNOTAVAIL;
 
         path = strjoina(paths.persistent_config, "/" SPECIAL_DEFAULT_TARGET);
@@ -1974,7 +1974,7 @@ int unit_file_lookup_state(
                 break;
 
         case UNIT_FILE_TYPE_REGULAR:
-                r = unit_file_is_generated(paths, i->path);
+                r = path_is_generator(paths, i->path);
                 if (r < 0)
                         return r;
                 if (r > 0) {
@@ -2191,7 +2191,7 @@ static int preset_prepare_one(
 
                 if (i->type == UNIT_FILE_TYPE_MASKED)
                         return -ESHUTDOWN;
-                if (unit_file_is_generated(paths, i->path))
+                if (path_is_generator(paths, i->path))
                         return -EADDRNOTAVAIL;
         } else
                 r = install_info_discover(scope, minus, root_dir, paths, name, SEARCH_FOLLOW_CONFIG_SYMLINKS, &i);