1 /* SPDX-License-Identifier: LGPL-2.1+ */
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 #include "_sd-common.h"
24 _SD_BEGIN_DECLARATIONS
;
29 SD_PATH_TEMPORARY_LARGE
,
31 /* Vendor supplied data */
32 SD_PATH_SYSTEM_BINARIES
,
33 SD_PATH_SYSTEM_INCLUDE
,
34 SD_PATH_SYSTEM_LIBRARY_PRIVATE
,
35 SD_PATH_SYSTEM_LIBRARY_ARCH
,
36 SD_PATH_SYSTEM_SHARED
,
37 SD_PATH_SYSTEM_CONFIGURATION_FACTORY
,
38 SD_PATH_SYSTEM_STATE_FACTORY
,
40 /* System configuration, runtime, state, ... */
41 SD_PATH_SYSTEM_CONFIGURATION
,
42 SD_PATH_SYSTEM_RUNTIME
,
43 SD_PATH_SYSTEM_RUNTIME_LOGS
,
44 SD_PATH_SYSTEM_STATE_PRIVATE
,
45 SD_PATH_SYSTEM_STATE_LOGS
,
46 SD_PATH_SYSTEM_STATE_CACHE
,
47 SD_PATH_SYSTEM_STATE_SPOOL
,
49 /* Vendor supplied data */
50 SD_PATH_USER_BINARIES
,
51 SD_PATH_USER_LIBRARY_PRIVATE
,
52 SD_PATH_USER_LIBRARY_ARCH
,
55 /* User configuration, state, runtime ... */
56 SD_PATH_USER_CONFIGURATION
, /* takes both actual configuration (like /etc) and state (like /var/lib) */
58 SD_PATH_USER_STATE_CACHE
,
61 SD_PATH_USER
, /* $HOME itself */
62 SD_PATH_USER_DOCUMENTS
,
64 SD_PATH_USER_PICTURES
,
66 SD_PATH_USER_DOWNLOAD
,
68 SD_PATH_USER_TEMPLATES
,
72 SD_PATH_SEARCH_BINARIES
,
73 SD_PATH_SEARCH_BINARIES_DEFAULT
,
74 SD_PATH_SEARCH_LIBRARY_PRIVATE
,
75 SD_PATH_SEARCH_LIBRARY_ARCH
,
76 SD_PATH_SEARCH_SHARED
,
77 SD_PATH_SEARCH_CONFIGURATION_FACTORY
,
78 SD_PATH_SEARCH_STATE_FACTORY
,
79 SD_PATH_SEARCH_CONFIGURATION
,
81 /* Various systemd paths, generally mirroring systemd.pc — Except we drop the "dir" suffix (and
82 * replaces "path" by "search"), since this API is about dirs/paths anyway, and contains "path"
83 * already in the prefix */
85 SD_PATH_SYSTEMD_SYSTEM_UNIT
,
86 SD_PATH_SYSTEMD_SYSTEM_PRESET
,
87 SD_PATH_SYSTEMD_SYSTEM_CONF
,
88 SD_PATH_SYSTEMD_USER_UNIT
,
89 SD_PATH_SYSTEMD_USER_PRESET
,
90 SD_PATH_SYSTEMD_USER_CONF
,
92 SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT
,
93 SD_PATH_SYSTEMD_SEARCH_USER_UNIT
,
95 SD_PATH_SYSTEMD_SYSTEM_GENERATOR
,
96 SD_PATH_SYSTEMD_USER_GENERATOR
,
97 SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR
,
98 SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR
,
100 SD_PATH_SYSTEMD_SLEEP
,
101 SD_PATH_SYSTEMD_SHUTDOWN
,
107 SD_PATH_MODULES_LOAD
,
110 /* systemd-networkd search paths */
111 SD_PATH_SYSTEMD_SEARCH_NETWORK
,
116 int sd_path_lookup(uint64_t type
, const char *suffix
, char **path
);
117 int sd_path_lookup_strv(uint64_t type
, const char *suffix
, char ***paths
);
119 _SD_END_DECLARATIONS
;