mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-27 03:21:32 +03:00
sd-path: export "systemd-network-path"
Inspired by https://lists.freedesktop.org/archives/systemd-devel/2020-March/044169.html.
This commit is contained in:
parent
b0c8219260
commit
f1bb691a5a
@ -98,6 +98,8 @@
|
||||
<constant>SD_PATH_BINFMT_DIR</constant>,
|
||||
<constant>SD_PATH_MODULES_LOAD_DIR</constant>,
|
||||
<constant>SD_PATH_CATALOG_DIR</constant>,
|
||||
|
||||
<constant>SD_PATH_SYSTEMD_NETWORK_PATH</constant>,
|
||||
};</funcsynopsisinfo>
|
||||
|
||||
<funcprototype>
|
||||
|
@ -71,3 +71,4 @@ char **generator_binary_paths(UnitFileScope scope);
|
||||
char **env_generator_binary_paths(bool is_system);
|
||||
|
||||
#define NETWORK_DIRS ((const char* const*) CONF_PATHS_STRV("systemd/network"))
|
||||
#define NETWORK_DIRS_NULSTR CONF_PATHS_NULSTR("systemd/network")
|
||||
|
@ -633,7 +633,12 @@ static int get_search(uint64_t type, char ***list) {
|
||||
|
||||
*list = t;
|
||||
return 0;
|
||||
}}
|
||||
}
|
||||
|
||||
case SD_PATH_SYSTEMD_NETWORK_PATH:
|
||||
return strv_from_nulstr(list, NETWORK_DIRS_NULSTR);
|
||||
|
||||
}
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -81,6 +81,8 @@ static const char* const path_table[_SD_PATH_MAX] = {
|
||||
[SD_PATH_BINFMT_DIR] = "binfmt-dir",
|
||||
[SD_PATH_MODULES_LOAD_DIR] = "modules-load-dir",
|
||||
[SD_PATH_CATALOG_DIR] = "catalog-dir",
|
||||
|
||||
[SD_PATH_SYSTEMD_NETWORK_PATH] = "systemd-network-path",
|
||||
};
|
||||
|
||||
static int list_homes(void) {
|
||||
|
@ -102,6 +102,9 @@ enum {
|
||||
SD_PATH_MODULES_LOAD_DIR,
|
||||
SD_PATH_CATALOG_DIR,
|
||||
|
||||
/* systemd-networkd search paths */
|
||||
SD_PATH_SYSTEMD_NETWORK_PATH,
|
||||
|
||||
_SD_PATH_MAX,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user